copy feature dataset from sde to sde

1906
2
05-26-2010 08:55 AM
MikeJun
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.SetProduct("ArcInfo")
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"


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

ex)

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

gp.Copy_management(dataset, varCOB + '\\' + dataset, "FeatureDataset")
0 Kudos
VaL
by
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