latch_holders.sql
Download Script
col sid for 999 heading 'SID'
col serial for 999999 heading 'Serial#'
col username for a12 heading 'User'
col latch_num for 999 heading 'Latch#'
col latch for a45 heading 'Latch Name'
select nvl(a.sid,0) sid,
nvl(a.serial#,0) serial,
a.username username,
c.latch# latch_num,
c.name latch
from v$session a, v$latchholder b, v$latch c
where a.sid(+) = b.sid
and b.laddr = c.addr;
