Jump to: navigation, search

Configure unixODBC for DB2 on Solaris

  1. In $DRIVER/clidriver/cfg:
    1. Rename db2cli.ini.sample to db2cli.ini
    2. Rename db2dsdriver.cfg.sample to db2dsdriver.cfg
    3. Modify the <dsncollection> element of db2dsdriver.cfg by inserting
    4. <dsn alias="DB2_ALIAS" name="DB2_NAME" host="db2host.<your company>.com" port="5000"?> <parameter name="Authentication" value="Client"/></dsn>

    5. 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>
      
  2. Modify $HOMEDIR/.odbc.ini by adding the following:
    [DB2_ALIAS]
    Description=my DB2
    Driver=DB2_DRIVER
  3. 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
  4. Set variables:
    export LD_LIBRARY_PATH=$DRIVER/clidriver/lib/:$UNIXODBC/lib/
  5. Test the DSN 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!