Configure unixODBC for DB2 on AIX 32
- 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> </database>
- Modify $HOMEDIR/.odbc.ini by adding the following:
[DB2_ALIAS]
Description=my DB2
Driver=DB2_DRIVER - In $DRIVER/clidriver/lib/:
- Unzip libdb2.a using the command
ar -x libdb2.a - A new file named shr.o appears as a result of unzipping. Rename it libdb2.so.1.
- Unzip libdb2.a using the command
- Modify odbcinst.ini in $UNIXODBC/etc/ by adding the following:
[DB2_DRIVER]
Description=DB2 ODBC Driver
Driver=$DRIVER/clidriver/lib/libdb2.so.1
Fileusage=1
DontDLClose=1
- Set variables:
export LIBPATH=$DRIVER/clidriver/lib/ - 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!