Configure unixODBC for DB2 on Linux 32 or 64
- In $DRIVER/clidriver/cfg:
- rename db2cli.ini.sample to db2cli.ini
- Rename db2dsdriver.cfg.sample to db2dsdriver.cfg
- Modify the <dsncollection> element of db2dsdriver.cfg by inserting
<dsn alias="DB2_ALIAS" name="DB2_NAME" host="db2host.<your company>.com" port="5000"?> <parameter name="Authentication" value="Client"/></dsn> - Modify the <databases> element of db2dsdriver.cfg by inserting
<database name="DB2_NAME" host="db2host.<your company>.com" port="5000"?> <parameter name="CurrentSchema" value="DB2I"/> <wlb> <parameter name="enableWLB" value="true"/><parameter name="maxTransports" value="50"/></wlb> <acr> <parameter name="enableACR" value="true"/> </acr>
- Modify $HOMEDIR/.odbc.ini by adding the following:
[DB2_ALIAS]
Description=my DB2
Driver=DB2_DRIVER - Modify odbcinst.ini in $UNIXODBC/etc/ by adding the following:
[DB2_DRIVER]
Description=DB2 ODBC Driver
Driver=$DRIVER/clidriver/lib/libdb2.so
Fileusage=1
DontDLClose=1 - Test the connection:
./isql -v DB2_ALIAS username password
This page was last edited on June 19, 2020, at 14:27.
Comments or questions about this documentation? Contact us for support!