mbly29

Setting SDE connection as workspace

Discussion created by mbly29 on Oct 24, 2012
Latest reply on Apr 7, 2014 by rankeny
Hi,

I am trying to run a simple script that simply copies feature datasets from one file geodatabase to another. This is successful, however now I am attempting to copy from a versioned SDE geodatabase to a file geodatabase. I have set the workspace to the SDE using the following:

# Set environment settings
arcpy.env.workspace = r"C:\Users\mbly\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\COL_LCT_Base.sde"

When I run the script I get return code '0', assuming no errors, however nothing happens, the script does not run because i get the code within a fraction of a second. I am confused as to how to get the script to look at the SDE.

Do I have to create a script to connect as a direct connection with all the login credentials inside the script. I am sure this has been done many times over, this is nothing new.

Any ideas, direction?

Cheers,

Mike

Outcomes