Hi All,
I have three different levels of database connection in ArcCatalog on my PC which I use to connect to our Enterprise GDB for various reasons.
I have my user level connection for data editing.
I have one called GISADMIN which is the Data Owner.
And another with is called SDE which is the Geodatabase Admin User.
I have no access to the Database Admin User, this is managed by our in house I.T Dept.
I am trying to use the arcpy.DisconnectUser function in a python script, but no matter which of the connections mentioned above I use, I get the following error:
>>> arcpy.DisconnectUser(r'Database Connections\SDE@SDE_Spatial@SDE-DB.sde',123494)
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 1086, in DisconnectUser
return gp.disconnectUser(sde_workspace, users)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 504, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Unable to disconnect: The connection ID provided is for the current administrator connection
>>>
I have confirmed this by trying to use all three connections, also trying to disconnect several different connections from my Enterprise GDB.
Something strange is that if I put a completely random session ID in my python snippet, the exact same error is returned....
I am perplexed as to why this is happening to me, and I am unable to track down why this seems to have started happening all of a sudden.
Anyone have any troubleshooting ideas for me?
Cheers
-Ben
Solved! Go to Solution.
Just to close off my own question, it turns out that for some reason the permissions had changed on my Geodatabase Admin (SDE) User and this was causing the problem.
I had to elevate to my in house IT Dept to resolve.
Just to close off my own question, it turns out that for some reason the permissions had changed on my Geodatabase Admin (SDE) User and this was causing the problem.
I had to elevate to my in house IT Dept to resolve.
This same thing happened to me. I suspect the solution will be the same.
I believe what happened is that our IT team audited the SQL Server permissions and noticed our SDE account had quite high privileges, and as I am not located 'within' the IT team this is against business rules, so they revoked my access as SDE Admin, which in turn caused this error to rear its head.
Once my IT team restored previous permissions all was good again.
Cheers
I know this was quite some time ago now, but any idea what permissions were restored to the SDE user? I'm getting the same error using the arcpy.DisconnectUser, only this time on a 10.9.1 geodatabase.