Frequently asked question

How is the Oracle SID specified when making an operating system-authenticated direct connection to a geodatabase in Oracle?

Last Published: April 25, 2020

Answer

When using operating system (OS) authentication to connect from an ArcSDE client to a geodatabase in Oracle, a direct connection must be used and the Oracle instance to which the client is connecting must be specified.

Below are two options for specifying the Oracle SID:

· The ORACLE_SID can be set for the connecting session.

· The ORACLE_SID can be specified in the connection string.

Setting the ORACLE_SID for the connecting session
To set the ORACLE_SID for the connecting session, issue the following command prior to executing a local client from the Command Prompt or UNIX shell:

Code:
set ORACLE_SID=<SQL_Net_alias>

where the <SQL_Net_alias> is the alias used by the Oracle client to connect to the database.

To set the ORACLE_SID for the connecting session from a remote client executed from a Command Prompt on Windows, issue this command before launching the client:

Code:
set LOCAL=<SQL_Net_alias>

To set the ORACLE_SID for the connecting session from a remote client executed from a UNIX shell, issue this command before launching the client:

Code:
set TWO_TASK=<SQL_Net_alias>

Setting the ORACLE_SID with the connection string from a client application
To specify the ORACLE instance with the connection string, specific syntax must be provided for the Service in the connection file (ArcGIS or ArcIMS clients) or with the -i option (ArcSDE administration commands). The syntax varies depending on the version of Oracle to which the connection is made, and whether the connecting client is on the same server as the database or is on a remote computer.

For a local client, the syntax is

Code:
sde:oracle<release>:/;ORACLE_SID=<SQL_Net_alias>.


For a remote client on a Windows operating system, the syntax is

Code:
sde:oracle<release>:/;LOCAL=<SQL_Net_alias>


For a remote client on a UNIX or Linux operating system, the syntax is

Code:
sde:oracle<release>:/;TWO_TASK=<SQL_Net_alias>


<Release> is the release of Oracle being used. For example, for a direct connection from a remote Windows client to an Oracle 10g database (alias=oragdb), the syntax is

Code:
sde:oracle10g:/;LOCAL=ORAGDB


EXAMPLE command line:

Code:
sdelayer -o register -l foo,shape -e p -t ST_GEOMETRY -i sde:oracle10g:/;LOCAL=ORAGDB -C objectid

ArcSDE 9.3 for Oracle10g Build 508 Thu Apr 17 12:23:18 2008
Layer Administration Utility
-----------------------------------------------------
Successfully Created Layer.


Note:
Since OS authentication is being used, the example did not supply a user name or password for the connection.

From ArcGIS Desktop, check Operating System authentication on the Spatial Database Connections dialog box.
From ArcIMS, type a backslash (\) in the User name field of the ArcSDE Connection dialog box.
For ArcSDE administration commands, do not specify a -u or -p option with the command.

Article ID:000010254

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic