Select to view content in your preferred language

Disconnect user using arcpy Error

6528
5
03-03-2014 07:38 AM
VikramS
Frequent 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
0 Kudos
5 Replies
VinceAngelo
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
0 Kudos
AsrujitSengupta
Deactivated User
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
0 Kudos
AsrujitSengupta
Deactivated User
simply stated the "process_admin" server role along with db_owner should be sufficient!
0 Kudos
by Anonymous User
Not applicable

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)

0 Kudos
TaraDeRosa
Occasional Contributor

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.

0 Kudos