Locks (Esperas y Bloqueadores) | ExpoDBA

Locks (Esperas y Bloqueadores)

Locks (Esperas y Bloqueadores)

 

SELECT /*+ RULE */
a.sid,b.serial#,
decode(lmode, 0,'None(0)', 1,'Null(1)', 2,'Row Share(2)', 3,'Row Exclu(3)', 4,'Share(4)', 5,'Share Row Ex(5)', 6,'Exclusive(6)') lmode,
decode(request, 0,'None(0)', 1,'Null(1)', 2,'Row Share(2)', 3,'Row Exclu(3)', 4,'Share(4)', 5,'Share Row Ex(5)', 6,'Exclusive(6)') request,
a.ctime,
id1, id2, block, b.sql_hash_value, w.event, w.seconds_in_wait, b. program, b.machine, b.username
FROM gV$LOCK a,
gv$session b,
v$session_wait w
WHERE (a.id1, a.id2, a.type) IN (SELECT c.id1, c.id2, type FROM V$LOCK c WHERE c.request>0)
and a.sid = b.sid
and w.sid=b.sid
ORDER BY a.id1, a.request, ctime
/