copy feature dataset from sde to sde

05-26-2010 08:55 AM
New Contributor II
I just want to loop through all feature dataset and copy to other sde. It seems like running forever when I run the following python code.

import arcgisscripting
gp = arcgisscripting.create()
gp.Overwriteoutput = 1

gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")

gp.workspace = "S:\_GIS\_AutoProcess\dataconnections\sdeTEST_COBGISSDE.sde"

varCOB = "S:\_GIS\_AutoProcess\dataconnections\sdePROJ_COBGISSDE.sde"

   datasets = gp.ListDatasets()
   dataset =
   while dataset:
     gp.Copy_management(dataset, varCOB + dataset, "FeatureDataset")
     dataset =
    print gp.getmessages(2)
0 Kudos
2 Replies
New Contributor II
I figured out myself. I need to put double forward slash.


gp.workspace = "S:\\_GIS\\_AutoProcess\\dataconnections\\sdeTEST_COBGISSDE.sde"

gp.Copy_management(dataset, varCOB + '\\' + dataset, "FeatureDataset")
0 Kudos
New Contributor III

Sorry for digging up this topic but I want to do the same: FDS copy from SDE to SDE.

My set up is 

SDE1 - oracle w/r access

SDE2 - MS SQLS w/r access

SDE 1nad 2 are on different machines in the network. Typical bandwidth is ~2-5 MB/s.


Using arcgis pro 2.6.

SDE FDS has only feature classes and relationship classes. Outside of it in SDE1 DB there are more tables and relsh. classes. Both are linked with FDS.


Using copy-paste on the DS pops up an error 

Paste failed. Invalid name. 

in pro.


It does this for any item (DS, FC, table) simply copy-pasted wont work.

If using the script above - it starts and hangs for hours. Is that normal.

What is the best way to copy FDS from one SDE to another? As a bigger picture I need to completely make a copy of the full SDE1 DB to SDE2 DB - all in - FDS, tables, RClasses, domains etc. What would be the best way to do so?

0 Kudos