Saturday, December 22, 2012

Restoring ArcSDE SQL Database from SQL Backup File

In one of my projects I was given a SQL backup file (.bak) file and was told that this is an ArcGIS ArcSDE Database.

My task was to restore it into our ArcSDE Environment.

Here are few simple steps/tips on how to perform this task.

1. Use SQL Restore Command and restore the database.

2. It is very important to restore it to the same 'Original Database Name'. If this is not the case then it will not work correctly.

3. After restoring, in the restored database, there will be many users from the client environment. Verifiy if there is a 'sde' user. If there is a 'sde' user then run the following script in SQL. It is also assumed that in your environment there is a 'sde' user.

EXEC sp_change_users_login 'Update_One', 'sde', 'sde'

4. Make sure your 'sde' login is mapped to the newly restored database. The schema name should be same as the user name which is 'sde'.

5. Verify that the 'sde' user has the following permissions

CREATE TABLE
CREATE PROCEDURE
CREATE FUNCTION
CREATE VIEW
CONNECT
VIEW DATABASE STATE

6. Now establish a connection from 'ArcCatalog' as 'sde' user and you will be able to see the GIS data.

Have fun !

Cheers
Anand

All Blogs so far ...