Use the following steps if you are not using connection strings, but instead creating ODBC data sources to access datastore databases.
There are a number of different driver managers that you can use to configure an ODBC data source. These instructions are carried out using unixODBC. If you are using a different driver manager, consult the vendor instructions for creating data sources.
(This may differ depending on the version of Db2 you are running.)
[Db2] Description=Sample DB2 ODBC Database Driver=/opt/ibm/db2/dsdriver/lib/libdb20.so
[<datasource-name>] Driver = <driver-name> Server = <server-name> Port = <port-no> Database = <region-name>
[<datasource-name>] Driver = <driver-name> Server = <server-name> Port = <port-no> Database = $XREGN$
The following is an example of an .odbc.ini configuration file contains data sources for a local Db2 database instance with two datastores.
[DB2.ESDEMO] Driver = Db2 Server = localhost Port = 50000 Database = ESDEMO [DB2.XREG] Driver = Db2 Server = localhost Port = 50000 Database = $XREGN$