Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> v$lock columns, info about rollback slot??

v$lock columns, info about rollback slot??

From: Manuela Mueller <520040906697-0001_at_t-online.de>
Date: Tue, 18 Dec 2001 19:53:09 +0100
Message-ID: <3C1F9095.F5F4CB6B@t-online.de>


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
------ ---------- ---------- ---------- ---------- ---------- --



ADDR KADDR
-------- --------
MANU 9 14 3279 0 6 TM 212
51DC7DE4 51DC7DF8

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US