Select to view content in your preferred language

SDE lock problem

7455
3
03-13-2012 03:55 PM
DonFreeman
Emerging Contributor
I need to make some structural changes to a feature set I created recently in a SDE geodatabase,  but I cannot because it is locked. I can find no reason why it should be locked. Is there a way to determine who/what has the lock on it so I can clear it?
Thanks
0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Don,

There a few tables that you can check to see if there are any locks placed on a feature class.  These are:

sde.SDE_state_locks
sde.SDE_object_locks
sde.SDE_layer_locks
sde.SDE_table_locks

I would first check with the sde.SDE_table_locks table to see if there is a lock there.  You can run the following query first:

select registration_id from sde.SDE_table_registry where table_name = 'AIRPORTS'


Replace 'AIRPORTS' with the feature class name.  Take the returned value (i.e. 235) from this query and then execute:

select sde_id from sde.SDE_table_locks where registration_id = 235


You can then check the other tables with the value returned (i.e. 5256) from this query to see if there are any additional locks.  Ex:

select * from sde.SDE_state_locks where sde_id = 5256

select * from sde.SDE_object_locks where sde_id = 5256

select * from sde.SDE_layer_locks where sde_id = 5256


You can determine the user that is creating the lock(s) by querying the sde.SDE_process_information table.  Ex:

select * from sde.SDE_process_information where sde_id = 5256
0 Kudos
DonFreeman
Emerging Contributor
Thank you! I will give those a try. Turns out the locking user was me. Don't know why but even though I had removed all the layers from my project ArcMap was still maintaining locks on the feature classes. After I shut it down and restarted everything was fine. Go figure.
0 Kudos
JakeSkinner
Esri Esteemed Contributor
No problem.  Esri has actually made identifying locks much easier at 10.1.  This can be accomplished right from the Catalog window.  You can simply right-click on the geodatabase and you are presented with an Administration option.  Here there is a tab showing which locks exist and which user is placing the lock.
0 Kudos