Files
oracle/tpt/comments/library_cache_lock.txt

15 lines
522 B
Plaintext
Raw Normal View History

2026-03-12 21:23:47 +01:00
If the BLOCKING_SESSION isn't working well enough for you or doesn't exist in your DB version, then
you can use X$KGLLK directly to find sessions blocking/with interest in your lock
1) V$SESSION_WAIT.PARAMETER1 is the lib cache object handle we are trying to lock (@sw.sql)
-> V$EVENT_NAME PARAMETER1 shows that ( @sed "library cache lock" )
2) Query X$KGLLK by matching X$KGLLK.KGLHDADR to V$SESSION_WAIT.PARAMETER1
-> find the "holder" sid
3) Use sw, snapper on the SID holding the lock to see what its doing