Copy SDE geodatabase (source; enterprise geodatabase, destination; enterprise geodatabase)

3488
25
Jump to solution
03-15-2017 08:20 AM
JohnMellor__GISP
New Contributor III

What is the best way to make an entire copy of an SDE geodatabase to a "test" SDE geodatabase?   

Tags (1)
Reply
0 Kudos
25 Replies
JohnMellor__GISP
New Contributor III

What would be the PROs & CONs of simply backing up the production database, and restoring to different named database (say, as TEST) in the same instance? 

Reply
0 Kudos
Asrujit_SenGupta
MVP Regular Contributor

You can restore with a different name, but that is not supported with ArcGIS. You will not be able to connect from ArcGIS Desktop.

Reply
0 Kudos
EduardoAbreu-Freire
New Contributor III

Asrujit SenGupta‌ and George Thompson's Blog

Since this is true (in SQL Server backup and restore a DB will not able ArcGIS to connect to it) what should be the way to make a copy of a full geodatabase (datasets, feature classes, tables, RCs, subtypes, domains)?

Reply
0 Kudos
George_Thompson
Esri Frequent Contributor

You CAN connect to a restored SQL Server DB as long as the name of the DB is UNCHANGED. In these cases you must restore to a different instance of SQL Server or remove the original DB and then restore to the original instance.

You can make a copy via Copy/Paste in Catalog once you reconcile/post/compress and verify that any versioned data is out of the delta tables.

--- George T.
CollinJohnston
Occasional Contributor II

Don't mind me jumping in mid thread here.  I am trying to understand if I can

  • Restore a backup enterprise gdb with a new name to the same instance
  • Work on the gdb via SSMS tools. Mainly removing views and linked server
  • backup e gdb with new name / Remove existing e gdb
  • Restore e gdb with original name
  • Connect

Is there something when changing the name temporarily that will corrupt my egdb or is it just connecting via Arc with new name that doesn't work?

 I need to do some basic db operations outside of Arc. Any idea if the concept of having a temp name , workign within SQL will work in this scenario?

Reply
0 Kudos
Asrujit_SenGupta
MVP Regular Contributor

Yes, that should work.

But I am assuming, that you are not going to drop Views which are Registered with the Geodatabase.

Its just connecting via, that won't work. Otherwise it won't corrupt anything.

CollinJohnston
Occasional Contributor II

Good day. Thanks for your response. I'm going to have to show my lack of db understanding, though. Well, they might be registered with the Geodatabase? Other than just being in my db under the views section in SSMS,is there another way I can tell if they are "registered"?

I have a feeling this route is not going to work for me either. 

Reply
0 Kudos
Asrujit_SenGupta
MVP Regular Contributor

Did you create these Views? How were they created?

Views created from the Database end or using the "Create Database View" tool, are not registered with the Geodatabase automatically. You can modify them freely from Database end.

To Register a View with Geodatabase, you need to use the Register with Geodatabase—Help | ArcGIS Desktop tool.

Register a table or view with the geodatabase—ArcGIS Help | ArcGIS Desktop 

https://community.esri.com/groups/geodatabase/blog/2016/12/14/new-at-105-registering-a-database-view... 

CollinJohnston
Occasional Contributor II

I did not create the views and they were created via SSMS, so not automatically registered it would seem. These were created by developer who is no longer with us and I'm sure he did not go into the world of GIS and register them. Well as sure as I can get since he was terrified of the idea of needing to use ESRI tools when he was helping me. haha. 

I've looked at these links (THANK YOU!) and looked back at the views via Catalog. The option to Register is still clickable, so I'm going to go ahead and assume they are in fact not registered. I will try to verify on an old Test/Dev setup if I can get some time to bring it back to life. 

Otherwise, it sounds like renaming temporarily will not corrupt and I can end up with the same old name and full functionality. Yeah? fingers crossed

Asrujit_SenGupta
MVP Regular Contributor

Use simple Copy\Paste OR Export using XML Workspace documents.....that will copy everything you needed.