English

Error: Failed to connect to database. The supplied path to the sdehome directory is invalid

Error Message

Attempting to make an ArcSDE direct connect to an Oracle or Microsoft SQL Server database, may generate the following error:

"Failed to connect to database.
The supplied path to the sdehome directory is invalid."

Cause

The ArcSDE client cannot locate the direct connect libraries. If the client environment is not properly configured, direct connect will fail.

Solution or Workaround

To make a direct connection to the spatial database, it is necessary for the direct connect DLLs to be present in either %SDEHOME%\bin, %ARCHOME%\bin, %ARCGISHOME%\bin, or in a directory listed in the registry.

Note:
While Windows variable naming conventions are used throughout this article, the information also applies to Linux and UNIX environments.

  • Set the %SDEHOME%, %ARCHOME%, or %ARCGISHOME% environment variables to a valid directory containing a bin folder that contains either the gsrvr<version>.dll (for example, gsrvrsql92.dll) or sdesqlsrvr<version>.dll (for example, sdesqlsrvr92.dll) and the three client sde libraries sg.dll, pe.dll, and sde.dll.
  • The search order for these dlls is:
    1. %SDEHOME%
    2. %ARCHOME%
    3. %ARCGISHOME%
    4. The sourcedir key under \HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcInfo\Desktop\8.0 (Windows only)
    Note:
    The search order does not recover from search errors. For example, if %SDEHOME% is set to c:\mylibraries and this folder contains the wrong gsrvrora** dlls, an error is generated and %ARCGISHOME% will not be searched.