Settings for the To Database component

If you have specified To Database as the destination component for your channel, the Destination screen for this channel definition enables you to configure this destination component.

To configure the To Database destination component:

  1. From the Database API list box, select the database API that you want to use.
  2. In the Data source field, type the name of the data source. This data source name depends on the database API that you are using:
    Database API Expected data source
    MySQL If the database is locally hosted, the data source name is the name of the database schema. For remote databases, use the form schema@host or schema@host:port, where host is the IP address or hostname of the server.
    OCI – Oracle One of the following:

    • The Oracle service name, which is the name in the tnsnames.ora file;
    • The Oracle connection string;
    • The Oracle Instant Client connection string (for example, <host>:<port>/<servicename>)
    Any ODBC-based database API The name of the ODBC system data source (System DSN)

    Hint: To include the value of an environment variable in the Data source or Database username field, use ${name}, where name is the name of the environment variable that you have defined. If you include an environment variable, a preview field appears that displays the value of the field after the environment variable is replaced by its value.

  3. If your data source uses password authentication, type the password username in the Database password field.
  4. In the On database error section, select the Skip message radio button if you want the channel to skip the message if a database error occurs. Select the Stop channel radio button if you want the channel to stop when a database error occurs. (The default is Stop channel.)
  5. In the Full parser VMD path field, type or browse for the location of the message definition (VMD) file. This VMD file parses the HL7 messages received from the source component. It also determines the data to map out of the messages and the database tables to which the data is to be mapped. When you supply the file path, the absolute path is displayed. This enables you to ensure that the VMD file is located where you expect it to be.Hint: To include the value of an environment variable in the file path, use ${name}, where name is the name of the environment variable that you have defined. For example, the file path ${MYDIR}\myfile.vmd includes the value of the MYDIR environment variable. The iguana_dir environment variable, which is defined by Iguana, is set to be the location of the Iguana configuration directory. To include this directory in your file path, specify ${iguana_dir} as part of the path.
  6. In the On VMD parse error section, select the Skip message radio button if you want the channel to skip the message if an error occurs when parsing the VMD file specified in Full parser VMD path. Select the Stop channel radio button if you want the channel to stop when a parse error occurs. (The default is Stop channel.)
  7. In the Data insertion order section, select the In table grammar order radio button if you want data to be inserted into tables in the order specified by the table grammar that is used to parse the message. (This table grammar is contained in the VMD file specified in the Full parser VMD path field.) Select the In alphabetical order by table name button if you want insertions and updates into tables to be performed alphabetically by table name.

    Note: The In alphabetical order by table name radio button handles the rare circumstances in which deadlocks occur if two or more channels insert data into the same tables, but in a different order. If a deadlock is occurring in an Iguana server because multiple channels with To Database destination components are writing to the same database, you can configure Iguana to serialize database insertions if you are using Iguana 4.1.17 or later. To do this, define the IGUANA_USE_INSERT_LOCK environment variable, and set its value to yes. See Environment Variables for information on how to define an environment variable.

  8. From the Reconnect to DB? list box, select whether you want Iguana to try and reconnect to the database during channel startup if an initial connection could not be made. Select No if you do not want Iguana to reconnect, Yes (unlimited) if you want Iguana to keep trying to connect forever, or Yes, with limit if you want Iguana to make a limited number of reconnection attempts.

    Note: If you select Yes, with limit, you must specify the number of times to try to reconnect and the number of milliseconds between reconnection attempts. 10000 milliseconds is commonly used here.

  9. In the Database timeout field, specify the timeout value that your database uses. (This field appears only if you have selected ODBC – MS SQL Server from the Database API list box.)

Did you know? If you have previously created a channel whose destination component is To Database, the values that you have typed into fields or selected from list boxes are copied from that channel to your new To Database destination component. If you have not created a channel whose destination component is To Database but you have created a channel whose source component is From Database, the following values are copied from the existing From Channel source component to your new To Channel destination component:

  • Database API
  • Data source
  • Database username
  • Database password
  • Reconnect to DB?
  • Reconnection interval

This makes it easier for you to create multiple channels that access the same database with the same settings.

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.