Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> v$lock columns, info about rollback slot??
Dear all,
currently I'm studying lock contention, deadlocks.
I made the following simple sceanrio:
user manu acquires a lock for one of her tables:
LOCK TABLE my_keep in exclusive mode NOWAIT;
UPDATE manu.my_keep
SET id = 1
WHERE id = 9999
-- Note: lock is held, Statement is not finished with ; and NO COMMIT!!!
user sys queries v$lock to gather info about currently held locks:
select s.username, s.sid, s.serial#, l.id1, l.id2, l.lmode, l.type,
l.ctime, l.addr, l.kaddr
from v$session s, v$lock l
where s.sid = l.sid
and s.username is not null;
output:
USERNA SID SERIAL# ID1 ID2 LMODE TY
CTIME
------ ---------- ---------- ---------- ---------- ---------- --
I think I understand column TYPE (TM DML enqueue, the user acquired a
table lock),
LMODE (6, user acquired an exclusive lock).
I have the following questions on columns ADDR, KADDR: The server
reference describes
ADDR: address of lock state object
KADDR: address of lock
Does this mean address in memory?
Furthermore, I found an old Oracle exam question which baffles me:
Why would you query v$lock?
Correct answer:
to display the number and the slot number of the rollback segment und ID
of the table being modified for a lock currently held.
The part of the table ID is clear to me, but how do I see infos about the number and the slot number of the rollback segment in v$lock? Maybe I misinterpret the description of v$lock?
Any suggestions are welcome. Thank's a lot and have a nice day... Manuela Mueller Received on Tue Dec 18 2001 - 12:53:09 CST