Specify Oracle Client Version in Database Connection

3259
11
08-03-2011 02:10 PM
JoshuaBixby
MVP Esteemed Contributor
Thus far, after checking a couple of different Help file locations, I am unable to figure out how to specify the Oracle client version in a Database Connection when a machine has multiple versions of Oracle clients installed.  Prior to 10.1, the Oracle client version was easily specified in the connection parameters.
0 Kudos
11 Replies
TomBrown
New Contributor
I'm curious, how would you have done this prior to 10.1?

ArcGIS simply makes the call to the Oracle client which would be the first one in the library path as the DLL is loaded.

Thanks.
0 Kudos
JoshuaBixby
MVP Esteemed Contributor
It is common in our organization for GIS staff, and occasionally other GIS users, to have 2 versions of Oracle client on their machines:  Oracle 9i and Oracle 11g.  The need for 2 Oracle clients is driven by non-GIS reasons; however, depending on which SDE instance people connect to, the direct connect strings vary.  For example, the two most common direct connects are:

     SDE:ORACLE9i:LEGACYINSTANCE
     SDE:ORACLE11G:INSTANCE

Since the LEGACYINSTANCE has SDE 9.2 SP6, Oracle 11g client cannot be used to connect from ArcGIS Desktop 9.3/9.3.1.

It could very well be that both connections are using the Oracle 11g client since it is the first Oracle client in the system's path.  I guess that is a question for Esri.  If that is the case, i.e., both use the same Oracle client, then my original question should have been:

   How does one specify different Oracle direct connect libraries in the Database Connection?
0 Kudos
EugeneYang
New Contributor
ArcGIS 10.1 can automatically figure out which direct connect driver to use, 10g or 11g, depending on which Oracle client is installed.

Oracle9i is no longer supported and ArcGIS 10.1 can not connect to 9.2 geodatabase on Oracle9i. I don't think you can have both ArcGIS 9.3.x and ArcGIS 10.1 on the same machine. Therefore, the particular situation you described would not happen.

If you absolutely need to have both Oracle11g and Oracle9i clients on the same machine, just make sure that Oracle11g is the first in the PATH on the ArcGIS 10.1 machine, and Oracle9i cleint is the first in the PATH on the ArcGIS 9.3.x machine.
0 Kudos
JoshuaBixby
MVP Esteemed Contributor
The example in my earlier post isn't hypothetical, it exists for ArcGIS 9.3.1.  I realize ArcGIS 10.1 won't connect to SDE 9.2; my question was really about the larger issue of specifying Oracle clients or libraries.  If Esri has added code for the database connection to " automatically figure out which direct connect driver to use", then that is what I needed to know because I could not find documentation that explicitly stated that information.

Prior to ArcGIS 10.1, in the not-so-distant past, the user had to specify different clients or libraries on one machine.  Automatic is good, as long as it works....
0 Kudos
JoshuaBixby
MVP Esteemed Contributor


ArcGIS simply makes the call to the Oracle client which would be the first one in the library path as the DLL is loaded.



I haven't had a chance to test with ArcGIS 10.0 or 10.1, but I just don't believe the situation is so with ArcGIS 9.3/9.3.1.  On our organization's machines that are configured with Oracle 10g and 11g clients and ArcGIS 9.3.1, it seems ArcGIS is looking for specific Oracle clients and not just the first Oracle client in the path.

The behavior on our machines is:
[INDENT]System PATH           SDE direct connect string    Result
10g path;11g path  sde:oracle10g                    Connection Succeeded
10g path;11g path  sde:oracle11g                    Connection Succeeded
11g path;10g path  sde:oracle10g                    Connection Succeeded
11g path;10g path  sde:oracle11g                    Connection Succeeded
10g path                  sde:oracle10g                    Connection Succeeded
10g path                  sde:oracle11g                    Failed:  Server library could not be loaded
11g path                  sde:oracle10g                    Failed:  Server library could not be loaded
11g path                  sde:oracle11g                    Connection Succeeded[/INDENT]
If ArcGIS was simply looking for the first Oracle client in the system  path, then errors would be generated if the SDE direct connect string  called a different Oracle version than the first one in the system path.
0 Kudos
JoshuaBixby
MVP Esteemed Contributor
The previous table of results for 9.3.1 is identical for our machines with ArcGIS 10.0 installed on them.
0 Kudos
JoshuaBixby
MVP Esteemed Contributor
The behavior must have changed for 10.1.  I have a machine with Oracle 10g and Oracle 11g clients installed, and both clients are fully functional.  When I try to make a connection to SDE 9.2, I get the following error:[INDENT]Database Connection
Failed to connect to the specified server.  Do you wish to continue?
ArcGIS 9.2 geodatabases do not support direct connect using Oracle 11g clients.  Please use the Oracle 10g client or the application server.
[/INDENT]Ignoring the fact that 10.1 connections to 9.2 are not supported anymore, how does one use the Oracle 10g client if there is no place to specify an Oracle client version when making a connection?
0 Kudos
JoshuaBixby
MVP Esteemed Contributor
Seeing that the Oracle client choice is supposed to be automatic at 10.1, and the error message I received is the red herring discussed in another thread, I guess it is likely ArcCatalog tried both Oracle clients (10g and 11g), failed with both clients (SDE 9.2 isn't supported anymore), and then only presented one error message to the end user.

If there is one suggestion to come out of this experience for me, it would be that more descriptive error messages would help clear the fog for end-users and speed troubleshooting for Esri Support.
0 Kudos
EugeneYang
New Contributor
The error message you saw when connecting to a 9.2 geodatabase is misleading. It is actually a known bug. We are fixing this issue at 10.1, and it will return a simple error that this release of geodatabase is no longer supported.

Thanks.
0 Kudos