Setting up your ODBC Connection String

If you use ODBC business rules, you need to supply your database connection string in the DBOpen rule. You can put it in either or both of these places:

During validation, if Instream or HIPAA Validator HIPAA Validator Desktop find a connection string within a DBOpen business rule, they will use it. If not, they look in $Dir.ini in their Bin directory for a connection string.

Putting connection strings in $Dir.ini

Use a text editor to edit $Dir.ini in the Bin directory of Instream or HIPAA Validator Desktop.

Add a Database section at end of the file, like this:

[Database]

DBRef="DRIVER={SQL Server};SERVER=(local);DATABASE=TI300;UID=sa;PWD=sa;"

DBRef1="DRIVER={SQL Server};SERVER=FCSUPP10;DATABASE=TI301;UID=sa;PWD=sa;"

You can have as many lines in this section as you need.

DBRef and DBRef1 are logical names of your choice and are used as the first parameter in the DBOpen business rule. Notice that the example rules above use DBRef. According to the first $Dir.ini database entry, this is the TI300 database.

Encrypting the DSN Information

It is also possible to utilize a [Database] entry that utilizes encryption to protect the connection string. Under the dir.ini [Database] section there is another type of entry allowed:

dbref=enc(connInfoPath)

where dbref is the database reference ID, and connInfoPath is the path to a text file containing the connection string for that database (The DB Connection Info File, or DBCIF).

This file can be located anywhere that Instream has read and write access.

Example:

[Database]

...

TestDB=enc("\TIBCO\instream\8.8\Bin\TestDBParams.ini")

...

The DBCIF contains a single database connection string just like a regular dir.ini [Database] entry. (It may also contain comment lines that start with the asterisk character in the first position, which are ignored by Instream.) The first time that Instream runs and encounters a 'dbref=enc(xxx)' type line in the dir.ini, it will get the connection information from the specified DBCIF ('xxx' in the example). If it finds that the connection information in that file is unencrypted, it will encrypt the connection line and write it back to the DBCIF, replacing the unencrypted line.

For example:

The initial DBCIF:

TestDBParams.ini

* The first non-comment line (i.e. line that does not start with an asterisk)
* is the connection string. Initially, this will be in plain text. The
* first time Instream reads this file, it will replace that line with the
* encrypted version of that line. This allows the user to put as many comment
* lines as they want that will remain readable.
DRIVER={SQL Server};SERVER="https://dbserver.mycompany.com/warthog";DATABASE=dbname;
USER=myBigLongUserId;PWD=myBigEvenLongerPassword!;

After the first Instream run, the connection information line will be encrypted, and the DBCIF will look like this:

TestDBParams.ini

* The first non-comment line (i.e. line that does not start with an asterisk)
* is the connection string. Initially, this will be in plain text. The
* first time Instream reads this file, it will replace that line with the
* encrypted version of that line. This allows the user to put as many comment
* lines as they want that will remain readable.
{{  .E³¢ÓÔùs#®qkñEÒ1"&Ùæ÷Tœ¿KGµl5_TÄÒÉÖÈÒ½ûÓÑÌ Óåòöåòý»ÓÅÒÖÅÒ½¢èô¡ð󺯯äâóåòöåò®íùãïíðáîù®ãïí¯
÷áòôèï碻ÆÁÒÔÆÒÐѽ±°°°±»ÄÁÔÁÂÁÓŽäâîáíå»ÕÇÐÒ½íùÎéçÌïîçÕóåòÉä»Ð׼íùÂéçÅöåîÌïîçåòÐáóó÷ïòäôÀ£¤¡Þ¥¤£ü¥»}}

When Instream finds the connection is already encrypted in the DBCIF, it will just decrypt the connection string and use it, with no updating of the DBCIF.