Objects locked by library cache - Oracle Database Script. SELECT to_char(SESSION_ID, '999') sid, substr(LOCK_TYPE, 1, 30) TYPE, substr(lock_id1, 1, 23) Object_Name, substr(mode_held, 1, 4) HELD, substr(mode_requested, 1, 4) REQ, lock_id2 Lock_addr FROM dba_lock_internal WHERE mode_requested'None' AND mode_requestedmode_held AND session_id IN (SELECT sid FROM v$session_wait WHERE wait_time=0 AND event LIKE '%library cache%') ;
SELECT to_char(SESSION_ID, '999') sid, substr(LOCK_TYPE, 1, 30) TYPE, substr(lock_id1, 1, 23) Object_Name, substr(mode_held, 1, 4) HELD, substr(mode_requested, 1, 4) REQ, lock_id2 Lock_addr FROM dba_lock_internal WHERE mode_requested'None' AND mode_requestedmode_held AND session_id IN (SELECT sid FROM v$session_wait WHERE wait_time=0 AND event LIKE '%library cache%') ;