ArcGIS Server Banner

Setting up a direct connection to Oracle

Setting up a direct connection to Oracle

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

About connecting directly to Oracle

To make a direct connection from a client machine to the Oracle database requires the Oracle client be installed on the client machine, the tnsnames.ora file be altered on the client, and an ODBC connection created.

How to set up clients

Oracle Net is required on each client machine you want to directly access your Oracle DBMS.

  1. Use Oracle tools to install and configure Oracle Net to connect to an Oracle instance with SQL*Plus.
  2. Follow the directions in your Oracle documentation to install Oracle Net.

  3. Test that Oracle Net was installed successfully by typing the following at a command prompt on the client machine:
  4. sqlplus <user name>/<password>@<Oracle Net service name>

    where <user name> is a valid Oracle user name, <password> is that user's password, and <Oracle Net service name> is the service name of the Oracle database to which you want to connect. (This is usually the global database name.)

    If you get the SQL prompt when you execute the command, the Net client is working and you are ready to go to the next step. If you do not get the SQL prompt, consult the Oracle documentation's troubleshooting information.

  5. For each client machine, there are system environment variables you must set, such as the ORAHOME and Path variables. If necessary, ask your system administrator to find out how to set environment variables on your systems.
  6. Test the connection by adding a spatial database connection from ArcCatalog. Instructions for this can be found in the topic Creating spatial database connections in the "Data management with ArcCatalog" section of the help.

Tips

  • Which connection string you type in the Service field of the Spatial Database Connection dialog box is dependent on which Oracle Client software you have installed on the local machine.
  • The sde:oracle** tells the ArcSDE client API which driver you are looking for, not to which database you are connecting. In other words, an Oracle9i driver will connect to an 8i database and vice versa. The drivers differ in the version of Oracle with which they were built.

    If you have Oracle8i client software on the local machine, use:

    sde:oracle

    If you have Oracle9i client software on the local machine, use:

    sde:oracle9i

    For connections from a local machine with the Oracle 10g client, use the syntax:

    sde:oracle10g

    If you have Oracle9i or Oracle 10g client software on the local machine and try to connect with the server string:

    sde:oracle

    you will get the following error message:

    Failed to Connect to Specified Server.  
    Underlying DBMS Error [ Unknown Error.  No extended error]

  • If you are using multiple geodatabases stored in Oracle, see Using multiple geodatabases within a DBMS to find the correct connection syntax for your service.
  • The password you type in the Password field of the Spatial Database Connection dialog box must have the Oracle Net Service name appended to it:
  • mypassword@<Oracle Net Service name>

  • If you are using ArcSDE 8.3 or lower, set the SDEHOME environment variable to point to the directory in which the client application's dynamically linked library files are stored. For ArcGIS Desktop, this should be the directory directly above the Bin directory in the ArcGIS installation location.

See Also

  • Setting up clients for a direct connection
  • Properties of a direct connection to an ArcSDE geodatabase