Identifying open edit sessions in SDE

1070
2
Jump to solution
02-15-2017 09:30 AM
LinkElmore
New Contributor III

I am interested in learning a method to identify open edit sessions for users connected to a SQL/SDE database.  Using SQL Management Studio, it is possible to examine the sde_object_locks table.  However, I am unsure if this reflects merely a lock from a user with edit privileges who is connected to their version or if it additionally means they are in an active edit session.  My interest is in being able to disconnect users to perform db maintenance without risking the possibility of data loss if they are in an active edit session.

0 Kudos
1 Solution

Accepted Solutions
LinkElmore
New Contributor III

I answered my own question by having a user open and close an edit session while refreshing the SQL query to view sde_object_locks.  Whenever an edit session opened, a new record appeared.  Closing the edit session removed the record from the table.  By cross referencing the object_id field with the version_id field in the sde_versions table, it's possible to see which version is locking the database.  Since each of my users has their own version, I know who to contact to disconnect before running maintenance operations that require disconnection.

View solution in original post

2 Replies
LinkElmore
New Contributor III

I answered my own question by having a user open and close an edit session while refreshing the SQL query to view sde_object_locks.  Whenever an edit session opened, a new record appeared.  Closing the edit session removed the record from the table.  By cross referencing the object_id field with the version_id field in the sde_versions table, it's possible to see which version is locking the database.  Since each of my users has their own version, I know who to contact to disconnect before running maintenance operations that require disconnection.

Asrujit_SenGupta
MVP Regular Contributor

Take a look at the SDE_states table as well. Whenever an user will be in an editing session, there should be an open state present in that table. Its easy to identify the user from there as well.