Disconnect user using arcpy Error

5286
5
03-03-2014 07:38 AM
Highlighted
Occasional Contributor
Hello All,

I have .sde file with database connection credentials . The credential has dbo_owner access . But When I try to run arcpy.DisconnectUser ,ut gives me an error saying that I am not using administrative connections . Do I need to have administrative connections to the GDB or to the entire sql instance ?

Connection information provided was for a non-administrative user

Please advise
Reply
0 Kudos
5 Replies
Highlighted
Esri Esteemed Contributor
The user must have the database privilege necessary to disconnect other users.
DBO is not enough -- For SQL-Server, "ALTER ANY SESSION" is required.

- V
Reply
0 Kudos
Highlighted
Regular Contributor III
Vikram,

To disconnect users, the geodatabase administrator may need additional privileges.

  • The geodatabase administrator (sde) in an sde-schema geodatabase requires VIEW DEFINITION privileges on the database to see the list of connected users, and must be a member of the processadmin fixed server role to disconnect users.

  • If the geodatabase administrator of a dbo-schema geodatabase is the database owner, the geodatabase administrator must be added to the processadmin fixed server role to disconnect users.

No additional privileges are required for the geodatabase administrator in a dbo-schema geodatabase if the geodatabase administrator is a member of the sysadmin fixed server role.

Removing connections from a geodatabase in SQL Server:
http://resources.arcgis.com/en/help/main/10.1/index.html#//002q000000r8000000
Reply
0 Kudos
Highlighted
Regular Contributor III
simply stated the "process_admin" server role along with db_owner should be sufficient!
Reply
0 Kudos
Highlighted
Occasional Contributor

May I suggest the responses posted here be added to the Help document to clarify the privileges required as indicated in the Help? ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Reply
0 Kudos
Highlighted
New Contributor II

We are attempting to use arcpy.DisconnectUser before running a nightly compression of a geodatabase. But when running arcpy.DisconnectUser, we are intermittently receiving an error stating that the connection information provided was for a non-administrative user. The geodatabase uses dbo-schema and we have confirmed that the geodatabase administrator is a member of the sysadmin server role.

 

Our SDE maintenance scripts fail periodically due to this issue similar to this post: https://community.esri.com/thread/180900. SDE is running v10.3.1 with a SQL Server 2012 back-end. The script runs from a VM that has ArcGIS 10.4.1 installed.

Reply
0 Kudos