Thursday, November 12, 2009

V$ENQUEUE_LOCK


V$ENQUEUE_LOCK displays all locks owned by enqueue state objects. The columns in this view are identical to the columns in V$LOCK.
Column
Datatype
Description
ADDR
RAW(4 | 8)
Address of lock state object
KADDR
RAW(4 | 8)
Address of lock
SID
NUMBER
Identifier for session holding or acquiring the lock
TYPE
VARCHAR2(2)
Type of lock. Lists user and system types that can have locks.
ID1
NUMBER
Lock identifier #1 (depends on type)
ID2
NUMBER
Lock identifier #2 (depends on type)
LMODE
NUMBER
Lock mode in which the session holds the lock:
  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)
REQUEST
NUMBER
Lock mode in which the process requests the lock:
  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)
CTIME
NUMBER
Time since current mode was granted
BLOCK
NUMBER
The lock is blocking another lock

Note:
1.       V$ENQUEUE_LOCK.SID can be joined to V$SESSION.sid. e
SELECT s.sid, username, program, module, action, logon_time, l.*
FROM v$session s, v$enqueue_lock l
WHERE l.sid = s.sid

Oracle data dictionary views

Last updated: 2009-11-12 Thursday