English

How To: Set up direct connect for DB2 with ArcGIS Server on Linux

Summary

Instructions provided describe how to set up the arcsoc.init file to include the environment variables necessary for performing DB2 direct connect.

Procedure

  1. Stop server:

    Code:
    <arcgis directory>/scripts/stopserver


    Note:
    In version 10.0, <arcgis directory> is the path to the server10.0 directory inside the arcgis directory. In previous versions, <arcgis directory> is the path to the arcgis directory.

  2. Make a backup of the <arcgis directory>/bin/arcsoc.init file:

    Code:
    cp <arcgis directory>/bin/arcsoc.init <arcgis directory>/bin/arcsoc.init.orig

  3. For DB2 Client version 8.x, set the following variables in the <arcgis directory>/bin/arcsoc.init file just before the exec $* statement:

    Code:
    SDEHOME=<arcgis directory>;export SDEHOME

    DB2_CLIENT_HOME=<DB2 client directory location>;export DB2_CLIENT_HOME

    DB2INSTANCE=<DB2 instance name>;export DB2INSTANCE

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/lib";export LD_LIBRARY_PATH

    PATH="$PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/bin:$DB2_CLIENT_HOME/adm:$DB2_CLIENT_HOME/misc";export PATH

    For example, with ArcGIS Server installed to /dir1/arcgis, DB2 Client located in /dir1/db2_81/db2udb/sqllib and DB2 instance named db2udb, the settings would be:

    Code:
    SDEHOME=/dir1/arcgis;export SDEHOME

    DB2_CLIENT_HOME=/dir1/db2_81/db2udb/sqllib;export DB2_CLIENT_HOME

    DB2INSTANCE=db2udb;export DB2INSTANCE

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/lib";export LD_LIBRARY_PATH

    PATH="$PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/bin:$DB2_CLIENT_HOME/adm:$DB2_CLIENT_HOME/misc";export PATH


    For DB2 Client version 9.x, set the following variables in the <arcgis directory>/bin/arcsoc.init file just before the exec $* statement:

    Code:
    SDEHOME=<arcgis directory>;export SDEHOME

    DB2_CLIENT_HOME=<DB2 client directory location>;export DB2_CLIENT_HOME

    DB2INSTANCE=<DB2 instance name>;export DB2INSTANCE

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/lib32";export LD_LIBRARY_PATH

    PATH="$PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/bin:$DB2_CLIENT_HOME/adm";export PATH

    For example, with ArcGIS Server installed to /dir1/arcgis, DB2 Client located in /dir1/db2_91/db2udb/sqllib and DB2 instance named db2udb, the settings would be:

    Code:
    SDEHOME=/dir1/arcgis;export SDEHOME

    DB2_CLIENT_HOME=/dir1/db2_91/db2udb/sqllib;export DB2_CLIENT_HOME

    DB2INSTANCE=db2udb;export DB2INSTANCE

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/lib32";export LD_LIBRARY_PATH

    PATH="$PATH:$SDEHOME/bin:$DB2_CLIENT_HOME/bin:$DB2_CLIENT_HOME/adm";export PATH

  4. Start server:

    Code:
    <arcgis directory>/scripts/startserver