Use the following steps if you do not intend to use connection strings, but instead create ODBC data sources to access region and cross-region 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$