English

How To: Set up direct connect for Informix with ArcGIS Server on Solaris

Summary

Instructions provided describe how to set up the init_server.sh file to include the environment variables necessary for performing Informix direct connect.

Procedure

The Informix SDK Client should be installed on the ArcGIS Server machine before continuing with the steps. The host name for the examples is 'Sunset'.

  1. Create an entry for the server to connect directly to the server in the .odbc.ini file located in the $HOME directory.
    Code:
    [<connection_name>]
    Driver=<path_to_driver_library>
    Description=Informix X.x ODBC Driver
    Database=<DB_name>
    HostName=<DB_hostname>
    Service=<direct_connect_Port_#>
    Protocol=ontlitcp
    Servername=<SDE_server_name>
    CursorBehavior=1
    UNICODE=UCS-2

    For example:

    Code:

    [sunset_connect]
    Driver=/sunset1/users/informix/lib/cli/iclis09b.so
    Description=Informix 9.x ODBC Driver
    Database=sde
    HostName=sunset
    Service=1526
    Protocol=ontlitcp
    Servername=sunset_ids10
    CursorBehavior=1
    UNICODE=UCS-2

  2. Create an entry in the $INFORMIXDIR/etc/sqlhosts (example: /sunset1/informix/ids_10.00.UC5/etc/sqlhosts) file for the server that is being directly connected to.
    Code:
    <SDE_server_name> ontlitcp <DB_hostname> <direct_connect_Port_#>

    Based on the example in step 1:

    Code:

    Sunset_ids10 ontlitcp sunset 1526

  3. Ensure that all direct connect libraries (for the corresponding version of ArcGIS Server, libsdeinfsrvr93.so for version 9.3) are present in the client (look in <ArcGIS Server Installation directory>/arcgis/bin).

    libsdeinfsrvr9<x>.so
    libgsrvrinf9<x>.so
    dcinf9<x>.so (Solaris engine products only)
  4. Edit the <ArcGIS Server Installation directory>/arcgis/servercore/.Server/init_server.sh file with the following variables:
    Code:

    INFORMIXDIR="<Informix client directory location>"; export INFORMIXDIR
    INFORMIXSQLHOSTS="<path to sqlhosts file>"; export INFORMIXSQLHOSTS
    ODBCINI="<path to .odbc.ini file>"; export ODBCINI
    SDEHOME="<arcgis directory>"; export SDEHOME
    PATH="$INFORMIXDIR/bin:$SDEHOME/bin:${PATH}"; export PATH
    LD_LIBRARY_PATH="$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/dmi:$INFORMIXDIR/lib:${LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH
    CLIENT_LOCALE=<Client Locale>; export CLIENT_LOCALE
    DB_LOCALE=<Database Locale>; export DB_LOCALE


    For example, with ArcGIS Server installed to /sunset1/arcgis and Informix Client located in sunset1/informix/ids_10.00.UC5, the settings would be:

    Code:

    INFORMIXDIR="/sunset1/informix/ids_10.00.UC5"; export INFORMIXDIR
    INFORMIXSQLHOSTS="/sunset1/informix/ids_10.00.UC5/etc/sqlhosts"; export INFORMIXSQLHOSTS
    ODBCINI="/sunset1/ags/.odbc.ini"; export ODBCINI
    SDEHOME="/sunset1/ags/arcgis"; export SDEHOME
    PATH="$INFORMIXDIR/bin:$SDEHOME/bin:${PATH}"; export PATH
    LD_LIBRARY_PATH="$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/dmi:$INFORMIXDIR/lib:${LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH
    CLIENT_LOCALE=en_US.819; export CLIENT_LOCALE
    DB_LOCALE=en_US.819; export DB_LOCALE

  5. Type the following in the Terminal Console:

    Code:

    cd <ArcGIS Server Installation directory>/arcgis/scripts
    ./stopserver

    source <ArcGIS Server Installation directory>/arcgis/servercore/.Server/init_server.sh

    ./startserver

  6. Verify that the direct connect method works by entering the command below:

    Code:

    sdelayer -o describe -i sde:informix:<odbc_dsn> -I <layer_name>

    where <odbc_dsn> = ODBC data source name