Select to view content in your preferred language

SQL to find the version name that is locking default version

88
0
Wednesday
Labels (2)
IrisHadarStltd
New Contributor III

Hi,

I'm seeking the most effective method to identify which version is locking the default version before initiating maintenance routines. This is my current approach, but I'm uncertain about its correctness.

Any suggestions on this matter would be greatly appreciated.

1. Find witch one is blocking:

 

select p.owner,oselect p.owner,o.lock_time
from sde.OBJECT_LOCKS o
inner join sde.process_information p on o.sde_id = p.sde_id
where object_id = 1

 

2.get the process info:

 

select sde_id from process_information
where owner = 'U2PH5'

 

3.get state_id

 

select state_id from STATE_Locks
where sde_id in (606147,606139)

 

4.get the version name

 

select NAME from versions where state_id in(5690105,
5690987,
5691192,
5690541,
5691075)

 

 

 

0 Kudos
0 Replies