Defining an ODBC connection on UNIX systems

In the UNIX environment, there is no ODBC Administrator or Driver Manager. To configure an ODBC data source name (DSN) definition, you must edit the required system information, which is held in a plain text file called .odbc.ini (note that the name of this file starts with a period).

Start of changeSet the ODBCINI environment variable to point to the file, specifying a full path and file name. If you do not set this variable, the path defaults to /var/mqsi/odbc, which is a directory created when WebSphere Business Integration Message Broker is installed. The file must have file permissions of mqm:mqbrkrs. End of change

A sample template is provided as the file <install_dir>/mqsi/merant/odbc.ini which contains examples of how to configure a DSN residing in each of the databases supported by WebSphere Business Integration Message Broker. The sample template files for the supported platforms are displayed below. They show the recommended configuration for the supported databases.

The entries in the stanzas that you must configure to match your local requirements are shown in italics (descriptions of these entries are provided in ODBC.ini Parameters). You must retain all the entries shown, but you can remove a complete stanza if you do not require it for your configuration (for example, if you are using an Oracle database, you can remove the stanzas shown for DB2 and Sybase).

Make a copy of the default file, set ODBCINI to point to this copy, and make any changes to the copied file rather than to the default.

Start of changeEnsure that the appropriate library search path environment variable (LD_LIBRARY_PATH on Solaris and Linux) is set to reflect the database products to be used. Refer to your database product documentation for more details.End of change

On AIX, if you are using DB2 as your database, a maximum of 10 connections using shared memory are allowed from a single process. This means that if you deploy more than one or two message flows at the same time, you might see connection failures characterized by the DB2 error message SQL1224N. The connection errors are reported in the system log from the broker's execution group. To avoid this problem, you must use TCP/IP mode to connect to DB2. For detailed instructions on how to do this, see You get DB2 error message SQL1224N when connecting to DB2.

AIX
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 410 Oracle Driver
SYBASEDB=DataDirect 410 Sybase ASE Driver
 
[WBRKBKDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.a
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.a
Description=MYDB DB2 ODBC Database
Database=MYDB

[ORACLEDB]
Driver=/usr/opt/mqsi/merant/lib/UKor818.so
Description=Oracle
ServerName=YourServerName
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
WorkArounds2=2
 
[SYBASEDB]
Driver=/usr/opt/mqsi/merant/lib/UKase18.so
Description=Sybase12
Database=sybasedb
ServerName=YourServerName
WorkstationID=id
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=10.30.14.72,5000
SelectUserName=1 
 
[ODBC]
Trace=0
TraceFile=/var/mqsi/odbc/odbctrace.out
TraceDll=/usr/opt/mqsi/merant/lib/odbctrac.so
InstallDir=/usr/opt/mqsi/merant
HP-UX
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 410 Oracle Driver
SYBASEDB=DataDirect 410 Sybase ASE Driver
 
[WBRKBKDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.sl
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.sl
Description=MYDB DB2 ODBC Database
Database=MYDB
 
[ORACLEDB]
Driver=/opt/mqsi/merant/lib/UKor818.sl
Description=Oracle
ServerName=YourServerName
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
WorkArounds2=2
 
[SYBASEDB]
Driver=/opt/mqsi/merant/lib/UKase18.sl
Description=Sybase12
Database=sybasedb
ServerName=YourServerName
WorkstationID=id
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=10.30.14.72,5000
SelectUserName=1 
 
[ODBC]
Trace=0
TraceFile=/var/mqsi/odbc/odbctrace.out
TraceDll=/opt/mqsi/merant/lib/odbctrac.sl
InstallDir=/opt/mqsi/merant
Start of changeLinuxEnd of change
Start of change
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
[WBRKBKDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.so
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.so
Description=MYDB DB2 ODBC Database
Database=MYDB
[ODBC]
Trace=0
TraceFile=/var/mqsi/odbc/odbctrace.out
TraceDll=/usr/opt/mqsi/merant/lib/odbctrac.so
InstallDir=/usr/opt/mqsi/merant
UseCursorLib=0
IANAAppCodePage=4
End of change
Solaris
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 410 Oracle Driver
SYBASEDB=DataDirect 410 Sybase ASE Driver
 
[WBRKBKDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.so
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=/u/db2inst1/sqllib/lib/libdb2.so
Description=MYDB DB2 ODBC Database
Database=MYDB
 
[ORACLEDB]
Driver=/opt/mqsi/merant/lib/UKor818.so
Description=Oracle
ServerName=YourServerName
EnableDescribeParam=1
OptimizePrepare=1
WorkArounds=536870912
WorkArounds2=2
 
[SYBASEDB]
Driver=/opt/mqsi/merant/lib/UKase18.so
Description=Sybase12
Database=sybasedb
ServerName=YourServerName
WorkstationID=id
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=10.30.14.72,5000
SelectUserName=1 
 
[ODBC]
Trace=0
TraceFile=/var/mqsi/odbc/odbctrace.out
TraceDll=/opt/mqsi/merant/lib/odbctrac.so
InstallDir=/opt/mqsi/merant

If you are going to access Oracle databases on AIX or Solaris, you must set up symbolic links:

(where <ORACLE_INSTALL_DIR> is the directory in which Oracle is installed on your system).

This step is not required on HP-UX.

If you fail to set up this link correctly, XA coordination will not work. The broker's queue manager starts (either when you start the broker, or when you issue strmqm, if you choose to start it independently), but records error AMQ7604 in the WebSphere MQ queue manager error log, indicating that Oracle has returned error XAER_RMFAIL or XAER_RMERR.

Related tasks
Creating a DB2 database on UNIX systems
Preparing databases on UNIX systems
Customizing DB2 databases
Related reference
Supported databases