Hello -
I have some Python scripts on our GIS server. Suddenly, actually just this morning, the SDE connections have stopped working. The scripts use .sde files located in a folder on a shared drive to set the python workspace to a database on our database server:
arcpy.env.workspace = os.path.join(sdeFolder,'test.sde') testFiles = arcpy.ListFeatureClasses() print testFiles
The arrays are empty rather than showing all feature classes. Any idea how to fix/debug?
Thanks!
Sarah
Solved! Go to Solution.
just to make sure, did you try the simple things like rebooting all the machines involved? Just to make sure it isn't just a hiccup in your system/network. If it worked yesterday, unless something was installed overnight, that usually fixes many things.
Likely not a python issue if it had been working.
What is the sdeFolder variable set to?
Is it an actual valid path?
Does test.sde actual exist in that folder?
I'd think you could do some quick checks directly in ArcCatalog.
Thanks James - It's a relative path to a server (e.g. "\\\SERVERNAME\Folder\sdeFolder"). It's valid and test.sde exists. The script and connection work fine from my desktop as well.
just to make sure, did you try the simple things like rebooting all the machines involved? Just to make sure it isn't just a hiccup in your system/network. If it worked yesterday, unless something was installed overnight, that usually fixes many things.
Hm, indeed. I don't have control to reboot the server but I will contact IT to give that a try and ask if they made any changes.
So the error came back, quickly. After talking more to IT they had done some updating and the connection to our database server was being attempted through an old DNS server that was gone. I don't know what they did to fix it, but they updated something and it's working again.
The most relevant question in all "All of a sudden, it's not working" situations is "What has changed?"
Unfortunately, with the modern division of IT, DBA, and geodatabase admin, the answer may not be all that obvious.
Then there's the counter-example -- I once had a mail server stop working when I changed the domainname, and eventually it was tracked down to the SunOS4 box being up for over 2 billion (2^31) milliseconds without reboot, and the OS bug just happened to occur while I was dorking with the system.
- V