Defining an ODBC connection to a 32-bit database on Linux and UNIX

In the Linux and UNIX environments, there is no ODBC Administrator or Driver Manager. To configure an ODBC data source name (DSN) definition for DataDirect, 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 $MQSI_REGISTRY/odbc/.odbc.ini for a 32-bit execution group, which is created when WebSphere Event Broker is installed. The file must have file permissions of mqm:mqbrkrs. End of change

Start of changeA sample template is provided in the file install_dir/merant/odbc.ini which contains examples of how to configure a DSN residing in each of the databases supported by WebSphere Event BrokerEnd of change The example stanzas for the supported platforms are displayed below. The examples 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 Editing the .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).

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

Start of changeIf you are using Linux (zSeries platform) or Linux (POWER platform), you do not need to define an ODBC connection. Instead, the data source name used in the message flow is the same as the DB2 alias of the database.End of change

Start of changeIf you have a 64-bit database package installed, or have created 64-bit execution groups:End of change

Start of changeIf you are using WebSphere MQ Version 6, refer to the section 'Implications of a 64-bit queue manager' in the WebSphere MQ Quick Beginnings book for your operating environment.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 can use TCP/IP mode to connect to DB2. For detailed instructions on how to do this, see DB2 error message SQL1224N is issued when you connect to DB2.

Here is the sample .odbc.ini information:

AIX
Start of change
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 5.0 Oracle
SYBASEDB=DataDirect 5.0 Sybase Wire Protocol
SQLSERVERDB=DataDirect 5.0 SQL Server Wire Protocol
INFORMIXDB=IBM Informix ODBC Driver
[WBRKBKDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.a
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.a
Description=MYDB DB2 ODBC Database
Database=MYDB
[ORACLEDB]
Driver=<Your_install_directory>/merant/lib/UKor820.so
Description=DataDirect 5.0 Oracle
EnableDescribeParam=1
OptimizePrepare=1
ServerName=<Your Oracle host>
WorkArounds=536870912
ProcedureRetResults=1

[SYBASEDB]
Driver=<Your_install_directory>/merant/lib/UKase20.so
Description=DataDirect 5.0 Sybase Wire Protocol
Database=<Your Database Name>
ServerName=<YourServerName>
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<YourServerName>,<YourPortNumber>
SelectUserName=1 
 
[SQLSERVERDB]
Driver=<Your_install_directory>/merant/lib/UKmsss20.so
Description=DataDirect 5.0 SQL Server Wire Protocol
Address=<Your SQLServer Host>,<Your SQLServer server port>
Database=<Your Database Name>
AnsiNPW=Yes
QuoteId=No
[INFORMIXDB]
Driver=<Your Informix Client Directory>/lib/cli/iclit09b.so
Description=IBM Informix ODBC Driver
ServerName=<YourServerName>
Database=<Your Datasource>
[ODBC]
Trace=0
TraceFile=<A Directory with plenty of free space>/odbctrace.out
TraceDll=<Your_install_directory>/merant/lib/odbctrac.so
InstallDir=<Your_install_directory>/merant
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8
End of change
HP-UX
Start of change
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 5.0 Oracle
SYBASEDB=DataDirect 5.0 Sybase Wire Protocol
SQLSERVERDB=DataDirect 5.0 SQL Server Wire Protocol
INFORMIXDB=IBM Informix ODBC Driver
 
[WBRKBKDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.sl
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.sl
Description=MYDB DB2 ODBC Database
Database=MYDB
 
[ORACLEDB]
Driver=<Your_install_directory>/merant/lib/UKor820.sl
Description=DataDirect 5.0 Oracle
EnableDescribeParam=1
OptimizePrepare=1
ServerName=<Your Oracle Host>
WorkArounds=536870912
ProcedureRetResults=1
[SYBASEDB]
Driver=<Your_install_directory>/merant/lib/UKase20.sl
Description=DataDirect 5.0 Sybase Wire Protocol
Database=<Your Database Name>
ServerName=<YourServerName>
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<YourServerName>,<YourPortNumber>
SelectUserName=1 
 
[SQLSERVERDB]
Driver=<Your_install_directory>/merant/lib/UKmsss20.sl
Description=DataDirect 5.0 SQL Server Wire Protocol
Address=<Your SQLServer host>,<Your SQLServer server port>
AnsiNPW=Yes
Database=<Your Database Name>
QuoteId=No
[INFORMIXDB]
Driver=<Your Informix Client Directory>/lib/cli/iclit09b.sl
Description=IBM Informix ODBC Driver
ServerName=<YourServerName>
Database=<Your Datasource>
[ODBC]
Trace=0
TraceFile=<A Directory with plenty of free space>/odbctrace.out
TraceDll=<Your_install_directory>/merant/lib/odbctrac.sl
InstallDir=<Your_install_directory>/merant
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8
End of change
Start of changeLinux (x86 platform)End of change
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 5.0 Oracle
SYBASEDB=DataDirect 5.0 Sybase Wire Protocol
SQLSERVERDB=DataDirect 5.0 SQL Server Wire Protocol
INFORMIXDB=IBM Informix ODBC Driver
[WBRKBKDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.so
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.so
Description=MYDB DB2 ODBC Database
Database=MYDB
[ORACLEDB]
Driver=<Your_install_directory>/merant/lib/UKor820.so
Description=DataDirect 5.0 Oracle
EnableDescribeParam=1
OptimizePrepare=1
ServerName=<Your Oracle Host>
WorkArounds=536870912
ProcedureRetResults=1
[SYBASEDB]
Driver=<Your_install_directory>/merant/lib/UKase20.so
Description=DataDirect 5.0 Sybase Wire Protocol
Database=<Your Database Name>
ServerName=<YourServerName>
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<YourServerName>,<YourPortNumber>
SelectUserName=1
[SQLSERVERDB]
Driver=<Your_install_directory>/merant/lib/UKmsss20.so
Description=DataDirect 5.0 SQL Server Wire Protocol
Address=<Your SQLServer host>,<Your SQLServer server port>
Database=<Your Database Name>
AnsiNPW=Yes
QuoteId=No
[INFORMIXDB]
Driver=<Your Informix Client Directory>/lib/cli/iclit09b.so
Description=IBM Informix ODBC Driver
ServerName=<YourServerName>
Database=<Your Datasource>
[ODBC]
Trace=0
TraceFile=<A Directory with plenty of free space>/odbctrace.out
TraceDll=<Your_install_directory>/merant/lib/odbctrac.so
InstallDir=<Your_install_directory>/merant
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8
Solaris (SPARC platform) and Solaris (x86-64 platform)
Start of change
[ODBC Data Sources]
WBRKBKDB=IBM DB2 ODBC Driver
MYDB=IBM DB2 ODBC Driver
ORACLEDB=DataDirect 5.0 Oracle 
SYBASEDB=DataDirect 5.0 Sybase Wire Protocol
SQLSERVERDB=DataDirect 5.0 SQL Server Wire Protocol
INFORMIXDB=IBM Informix ODBC Driver 
[WBRKBKDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.so
Description=WBRKBKDB DB2 ODBC Database
Database=WBRKBKDB
 
[MYDB]
Driver=<Your_DB2_installation_directory>/lib/libdb2.so
Description=MYDB DB2 ODBC Database
Database=MYDB
 
[ORACLEDB]
Driver=<Your_install_directory>/merant/lib/UKor820.so
Description=DataDirect 5.0 Oracle
EnableDescribeParam=1
ProcedureRetResults=1
ServerName=<Your Oracle Host>
WorkArounds=536870912
OptimizePrepare=1
[SYBASEDB]
Driver=<Your_install_directory>/merant/lib/UKase20.so
Description=DataDirect 5.0 Sybase Wire Protocol
Database=<Your Database Name>
ServerName=<YourServerName>
EnableDescribeParam=1
OptimizePrepare=1
SelectMethod=0
NetworkAddress=<YourServerName>,<YourPortNumber>
SelectUserName=1 
 
[SQLSERVERDB]
Driver=<Your_install_directory>/merant/lib/UKmsss20.so
Description=DataDirect 5.0 SQL Server Wire Protocol
Address=<Your SQLServer host>,<Your SQLServer server port>
AnsiNPW=Yes
Database=<Your Database Name>
QuoteId=No
[INFORMIXDB]
Driver=<Your Informix Client Directory>/lib/cli/iclit09b.so
Description=IBM Informix ODBC Driver
ServerName=<YourServerName>
Database=<Your Datasource>
[ODBC]
Trace=0
TraceFile=<A Directory with plenty of free space>/odbctrace.out
TraceDll=<Your_install_directory>/merant/lib/odbctrac.so
InstallDir=<Your_install_directory>/merant
UseCursorLib=0
IANAAppCodePage=4
UNICODE=UTF-8
End of change

You have now configured your 32-bit ODBC data source names on UNIX. Next, you must configure the environment for issuing console commands, and for running the broker, so that it can access the required database libraries. For more information, see Setting your environment to access databases.

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