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!去解决方案。
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 usingreferenceto table and not layer limitation in "management.DisableEditorTracking", but your solutions did the job!!!
看来,python跟踪活跃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.