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$
The data sources for the region and cross-region databases are configured. You can configure your enterprise server regions to use the region and cross-region databases.