English

How To: Create a direct connection from ArcIMS with an Oracle 9i client to a remote ArcSDE/Oracle 10g Release 1 server in a UNIX environment

Summary

ArcIMS users can connect to and read spatial data directly in an Oracle database without having to use an ArcSDE Application server; this connection is made by way of Author. Instructions provided describe how to create a direct connection from ArcIMS with an Oracle 9i client to a remote ArcSDE/Oracle 10g Release 1 server in a UNIX environment.

In some cases, the ArcSDE Application server may need to be bypassed to improve performance. To do this, update the SDEWORKSPACE element in the .AXL file and use Direct Connect.

Note:
This article assumes Oracle 9i client is used to connect to Oracle 10g Release 1 server.

Procedure

Before setting up Direct Connect, make sure:

· ArcIMS is setup properly and is working and stable.

· On the ArcIMS machine, install the Oracle client and set up Net service in the tnsnames.ora file. Test the connection to a remote Oracle server by way of Oracle's sqlplus utility:

Code:
sqlplus <username>/password@<Net_service>

When ArcIMS and the Oracle 9i client have been configured, proceed to set up Direct Connect using the following steps:

  1. Set $SDEHOME the same as $AIMSHOME in the system configuration file.

    For example, add the following entries in the .cshrc file:

    Code:
    setenv SDEHOME /home/ims91/arcgis/arcims

  2. In the system configuration file, set the environment variables for $ORACLEHOME and $TNS_ADMIN.

    For example, add the following entries in the .cshrc file:

    Code:
    setenv ORACLE_HOME /home/ora10g/product/10.1.0
    setenv TNS_ADMIN /home/ora10g/product/10.1.0/client_1/network/admin

  3. In the system configuration file, add $AIMSHOME/bin, $SDEHOME/bin, and $ORACLE_HOME/bin to the $PATH.
  4. In the system configuration file, add $AIMSHOME/lib, $SDEHOME/lib, and $ORACLE_HOME/lib to the $LD_LIBRARY_PATH.
  5. Create a symbolic or soft link of Oracle 10g libclntsh in $ORACLE_HOME/lib to the Oracle 9i name.

    For example:

    Code:
    %ln -s libclntsh.so.10.1 libclntsh.so.9.0

    The Direct Connect software library used to connect to a remote Oracle database is built using the Oracle 9i library. This library uses libclntsh.so.9.0 from Oracle to make a Direct Connect connection to the Oracle server. Since Oracle 10g provides libclntsh.so.10.1 instead of libclntsh.so.9.0, a symbolic link is required to force the Direct Connect library to use the correct libclntsh.so to make a connection.
  6. Run an executable, sdelayer, to make sure the environment is set up correctly on the ArcIMS machine.

    For example:

    Code:
    sdelayer -o describe -i sde:oracle9i -u <username> -p <password>@<Net_service>

  7. Access the ArcSDE data through Author. Create and save an .AXL file.
  8. In the .AXL file, make the following changes from:

    Code:
    <SDEWORKSPACE name="sde_ws-0" server="zephyr" instance="port:5151"
    database="test" user="test" encrypted="true" password="EPYCJM" geoindexdir="C:\DOCUME~1\ />

    to:

    Code:
    <SDEWORKSPACE name="sde_ws-0" server="zephyr" instance="sde:oracle9i"
    database="test" user="test" encrypted="false" password="test@ora" geoindexdir="C:\DOCUME~1\ />

    Replace values in:
    instance = sde:oracle9i
    encrypted = false
    database = <database>
    user = <username>
    password = <password>@<Net_service>