English

Error: Error: Failed to connect to the specified server. Underlying DBMS error[ERROR: cross-database references are not implemented]

Error Message

If custom dbinit.sde files were not created for each ArcSDE service when initially installing ArcSDE, the following error message is returned:

"Error: Failed to connect to the specified server. Underlying DBMS error[ERROR: cross-database references are not implemented]".

Each ArcSDE service connects to a single database; however, unless ArcSDE is told otherwise, it assumes that the database name is 'sde'. A different database name can be specified in the dbinit.sde file, which is created during ArcSDE installation. If an ArcSDE implementation requires multiple ArcSDE services, each of which will interact with their own uniquely named databases, then a separate dbinit.sde file is required for each service connecting to an ArcSDE geodatabase when using PostgreSQL. If dbinit files were not initially created for all services prior to running sdesetup -o install and creating the geodatabases, new custom dbinit.sde files must subsequently be created for each service in order to successfully create an application connection to the ArcSDE geodatabase.

Cause

If custom dbinit.sde files are not created for each service, the default dbinit created with the initial database will be used for all services. Therefore, regardless of what service is used in the ArcCatalog Spatial Database Connection dialog box, the initial database will always be connected to, because the default dbinit.sde file is being referenced. If another database name is specified for the database parameter in the database connection dialog box, the error message shown above is returned.

Solution or Workaround

On Linux:

  1. Create a new dbinit.sde file for each service found in the services.sde file at $SDEHOME/etc.

    Note:
    The dbinit.sde file name must mirror the name of the service exactly. For example, if the service is called esri_production, the dbinit would be named dbinit_esri_production.sde.


    The file should resemble the default dbinit.sde file's structure:

    set PGHOST = <server name>
    set PGPORT = <port number>
    set SDE_DATABASE= <database name>
  2. Re-run sdesetup -o install for each database that a new custom dbinit has been created for.

    Code:
    sdesetup –o install –d POSTGRESQL –D <database name> –u sde –p <password> –l


    The appropriate file is automatically referenced during the running of the sdesetup command.