Select to view content in your preferred language

Restore an ArcSDE database backup to a database with a different name?

3728
1
03-05-2013 08:23 AM
deleted-user-1T_bOHag6M8d
Deactivated User
I am using ArcSDE 10.1 and PostgreSQL 9.1/PostGIS 2.0. I have backups of a production database that I'd like to use for a development database. The name of the development database appends "_dev" to the database name to avoid confusion. However, when I restore the production backup to the development database, I receive the following error on connection:

2013-03-05 08:07:28 PST ERROR:  cross-database references are not implemented: "cvag.sde.sde_object_ids" at character 21
2013-03-05 08:07:28 PST QUERY:  SELECT base_id FROM cvag.sde.sde_object_ids WHERE id_type = i_id_type FOR UPDATE
2013-03-05 08:07:28 PST CONTEXT:  PL/pgSQL function "sde_get_primary_oid" line 15 at FOR over SELECT rows
2013-03-05 08:07:28 PST STATEMENT:  SELECT cvag_dev.sde.SDE_get_primary_oid ($1,$2) 


Which leads me to believe that one or more functions in the sde schema is defined with database names as a reference and restoring to a database with a different name doesn't work.

I have also tried creating the enterprise geodatabase first and then restoring a backup of the production database that excludes the 'sde' schema. The connection works, but now my 800+ feature classes are not registered with the geodatabase.

Are there any best practices published for working with production and development databases that might help me here?

Thanks.
0 Kudos
1 Reply
MandarPurohit
Esri Contributor
As you've already mentioned, the database name is indeed referenced in a PostgreSQL geodatabase repository. You will need to restore the database with the same name. This issue also applies to a SQL Server geodatabase is described here : FAQ:  Can I restore an ArcSDE geodatabase with a different database name in SQL Server?