I am using arcpy for som automated database editing and i am in need to connect or stay connected to SDE with db onwer account after i close SDE to new connections with db admin account.
It seems that python opens new SDE connection evry time arcpy method involving that dependency accours and "kills" it after method executions is finished.
Is there a way to keep connection "alive" so that i can use it after i disconnect all other conections and close sde to new connections?
Solved! Go to Solution.
Hi
I did not tried it but if you do a MakeFeatureLayer on one of the feature classes in SDE and do not delete this layer I think it will keep the connection open.
Hi
I did not tried it but if you do a MakeFeatureLayer on one of the feature classes in SDE and do not delete this layer I think it will keep the connection open.
Hi
I had some doubts because of using reference to table and not layer limitation in "management.DisableEditorTracking", but your solutions did the job!!!
It seems that python keeps track of active sde connections instanses and uses them in firs hand.
Thanks for the tips!
Maintaining an open arcpy.ArcSDESQLExecute cursor would probably accomplish the same thing.