Cheeky Cockatoo

Life Advice and Stories, Travel, Oracle Tech, Good Food and More

latch_holder.sql

Download Script

set pages 100
set verify off
Prompt You will be prompted for the library cache handle address.
prompt This is a decimal number sourced from v$session_wait or by running
prompt @waiters.

select s.sid, s.username, s.osuser, s.machine, 
       KGLLKMOD, KGLLKREQ, KGLHDNSP,
       k.USER_NAME||'.'||k.KGLNAOBJ object
from x$kgllk k, v$session s
where k.KGLLKHDL = ltrim(upper(to_char(&handle_address,'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')))
and k.KGLLKMOD <> 0
and k.KGLLKSES = s.saddr;