Does anyone know of any way to automatically break user connections to an enterprise geodatabase? We are trying to run some scripts overnight, but they need to acquire locks on certain datasets, and we have some users who leave connections open.
I'd like to find a way to break their connections without having to go through the manual process.
Database connection termination is a database feature. The syntax varies by RDBMS.
The only way Esri code could be involved is if an application server connection is used (and doing so is discouraged, partially because of this vulnerability).
I expect you could script user session termination in any of the dozen ArcSDE-supported RDBMSes.
Database connection termination is a database feature. The syntax varies by RDBMS.
The only way Esri code could be involved is if an application server connection is used (and doing so is discouraged, partially because of this vulnerability).
I expect you could script user session termination in any of the dozen ArcSDE-supported RDBMSes.
The third example for disconnect users shows how to use the list users function with the disconnect users function to disconnect only specific users based on their names.
This will work for both application server connections (3-tier) as well as direct connections (2-tier).
Also...to add to Russell's info about the GP tools (which you can script), you can list and disconnect users through the ArcGIS gui. This is from the 10.1 help (similar for 10.2):
The above has links to topics for removing connections from different types of databases. You'll have to make sure the sde admin user has the correct privileges (this is discussed in the help topics).