English

Error: An error is received when trying to access a SQL Server ArcSDE geodatabase that has been restored with a new name

Error Message

If an existing ArcSDE for SQL Server geodatabase is restored to a new or existing server and the original name of the database is not retained from when the ArcSDE Post-Installation was run initially, issues can be encountered when trying to connect to the geodatabase through ArcGIS.

A few examples of when errors may be encountered when accessing geodatabases restored in this manner are:
- performing a direct connect to a restored database
- trying to start the ArcSDE service
- connecting via an application server connection

In the above examples, several errors could occur if the original name of the database is not used:

Performing direct connect from ArcCatalog:
Failed to connect to database. Operation Failed

Within the sdedc_SQLServer.log
---------------------------------
[Tue Oct 18 09:26:57 2011] [0] [csc-jarman7d] Cannot Find Proc Info Record
[Tue Oct 18 09:26:57 2011] [0] [csc-jarman7d] Cannot Attach to Shared Memory -1
Starting ArcSDE Service:
The following error message appears after the service has been created and an attempt to start the service has been made:

"An error was encountered while running ArcSDE Post Installation Operation Failed, Unable to start iomgr. DBMS error code: 2714".

The sde_<service>.log file reports the following:

Code:

-------------------------------------------------------
ArcSDE 9.3 SQL Server Build 508 Thu Mar 3 18:55:48 PST 2009
-------------------------------------------------------
Connected to instance . . .
Unable to verify the existence of the DBTUNE table, error = -62.
DBMS error code: 2714
Microsoft OLE DB Provider for SQL Server: There is already an object named 'dbtune' in the database.

Connecting via Application server service within ArcCatalog:

Code:

-------------------------------------------------------
ArcSDE 10.0 for SQL Server Build 1343 Thu Feb 17 11:45:42 2011
-------------------------------------------------------
Connected to instance . . .
DBMS Connection established...
RDBMS: "SQL Server"
Instance Name: "esri_sde"
IOMGR Process ID (PID): 7912

[Tue Oct 18 12:04:08 2011] [0] [csc-jarman] Cannot Find Proc Info Record
[Tue Oct 18 12:04:08 2011] [0] [csc-jarman] Cannot Attach to Shared Memory -1
[Tue Oct 18 12:04:08 2011] [0] [GIOMGR] Error (-1):Couldn't Start Server Task.

Cause

The cause of such an error may be linked to restoring a database in SQL Server Enterprise Manager/Management Studio under a different name than the original backup or datafile.

Unfortunately, it is not possible to rename an ArcSDE geodatabase once it has been created. The name of the original database is hard-coded in database objects. When the name of a database has been changed using a stored procedure or a database is restored to a name different from the original, the database cannot be be accessed via ArcSDE or ArcGIS clients.

Solution or Workaround

Rename the database to its original name using the sp_renamedb stored procedure or use the command ALTER DATABASE MODIFY NAME.
If this is not possible, because an existing database shares the same name, the database must be restored to another SQL Server instance for access using its original name.

ALTER DATABASE (Transact-SQL)
sp_renamedb (Transact-SQL)

    Related Information