Configure unixODBC for DB2 on Solaris
- 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
- 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 - Modify $UNIXODBC/etc/odbcinst.ini by adding the following:
[DB2_DRIVER] Description=DB2 ODBC Driver Driver=$DRIVER/clidriver/lib/libdb2o.so Fileusage=1 DontDLClose=1 - Set variables:
export LD_LIBRARY_PATH=$DRIVER/clidriver/lib/:$UNIXODBC/lib/ - Test the DSN connection:
./isql -v DB2_ALIAS username password
<dsn alias="DB2_ALIAS" name="DB2_NAME" host="db2host.<your company>.com" port="5000"?> <parameter name="Authentication" value="Client"/></dsn>
This page was last edited on June 19, 2020, at 14:27.
Comments or questions about this documentation? Contact us for support!