Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Transaction Locking
PROMPT Locks Holders and Requestors Report
PROMPT
select distinct sh.username || '(' || sh.sid || ')' "Lock holder", ao.object_name "Object", l.type, decode(lmode, 1, 'NULL', 2, 'ROW SHARE', 3, 'ROW EXCLUSIVE', 4, 'SHARE', 5, 'SHARE ROW EXCLUSIVE', 6, 'EXCLUSIVE', '?') "Lock mode", sr.username || '(' || sr.sid || ')' "Object requester" from v$session sh, all_objects ao, v$lock l, v$session sr where l.id1 = ao.object_id and sh.sid = l.sid and sh.lockwait is null and sr.lockwait is not null and l.type = 'TM' order by 1, 2, 3;
PROMPT RW - Row wait enqueue lock PROMPT TM - DML enqueue lock PROMPT TX - Transaction enqueue lock PROMPT UL - User supplied lock PROMPT Lock mode - Lock mode held [one of the following values]: PROMPT 1 Null PROMPT 2 Row share PROMPT 3 Row exclusive PROMPT 4 Share PROMPT 5 Share row exclusive PROMPT 6 Exclusive