English

How To: Set up direct connect for Oracle 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 Oracle 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. Set the following variables in the <arcgis directory>/bin/arcsoc.init file just before the exec $* statement:

    Code:
    SDEHOME=<arcgis directory>;export SDEHOME

    ORACLE_HOME=<oracle client directory location>;export ORACLE_HOME

    PATH="$PATH:$SDEHOME/bin:$ORACLE_HOME/bin";export PATH

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


    Note:
    If the 64-bit version of the Oracle client is being used, the LD_LIBRARY_PATH value of $ORACLE_HOME/lib has to be $ORACLE_HOME/lib32 instead.

    For example, with ArcGIS Server installed to /dir1/arcgis and Oracle Client located in /dir1/oracli/app/oracle/product/10.2.0, the settings would be:

    Code:
    SDEHOME=/dir1/arcgis;export SDEHOME

    ORACLE_HOME=/dir1/oracli/app/oracle/product/10.2.0;export ORACLE_HOME

    PATH="$PATH:$SDEHOME/bin:$ORACLE_HOME/bin";export PATH

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

    If the tnsnames.ora file is not in the default location, the additional variable TNS_ADMIN must be added to the arcsoc.init file:

    Code:
    TNS_ADMIN=/dir1/oracli/app/oracle/product/10.2.0/network/admin;export TNS_ADMIN

    In this example, TNS_ADMIN is set to the default location of the tnsnames.ora file.
  4. Start server:

    Code:
    <arcgis directory>/scripts/startserver