cancel
Showing results for 
Search instead for 
Did you mean: 

How to read dbtable V$LOCK

Former Member
0 Kudos

HI Experts,

can anyone suggest me a Remote Function Module by which

i can read the DB01 locks.....

Basically i want to read the table V$LOCK...

Regards

SAM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

check report RSORALCK

Former Member
0 Kudos

st04

performance->additional functions-> display GV$VIEW

double click GV$LOCK

former_member192421
Active Participant
0 Kudos

Hi Sam,

The V$LOCK Oracle view is used to find out which sessions are currently holding enqueues or waiting for enqueues. This view contains all information about sessions that hold or wait for an enqueue.

SQL> describe v$lock

NAME        NULL?    TYPE

----------- -------  ---------

ADDR                 RAW(4)

KADDR                RAW(4)

SID                  NUMBER

TYPE                 VARCHAR2(2)

ID1                  NUMBER

ID2                  NUMBER

LMODE                NUMBER

REQUEST              NUMBER

CTIME                NUMBER

BLOCK                NUMBER

Where:

SID: System ID of the Oracle session that holds the enqueue or waits for it.

TYPE: Enqueue type

ID1, ID2: Enqueue-dependent lock IDs

TM enqueue -> ID1 = Object ID of the locked object

LMODE: Mode of the held enqueues

REQUEST: Mode of the requested enqueues

CTIME: Time in current mode (in seconds), that is, hold or queue time

BLOCK: 0 -> no session is waiting for the enqueue; 1 -> at least one session is waiting for the enqueue

For sessions that are holding an enqueue, REQUEST is 0 and LMODE is higherthan 0.

For sessions that are waiting for an enqueue, REQUEST is greater than 0 and LMODE is 0.

You can recognize those sessions in the Oracle session overview that are waiting for an enqueue (REQUEST is higher than 0) by the fact that they are waiting for the enqueue wait event.

Thanks,

Rajkumar

Former Member
0 Kudos

you can use report RSORADJV

then you can execute sql query

select * from v$lock

Regards

Gajanand Gupta

HuseyinBilgen
Active Contributor
0 Kudos

Don't know how to read locks displayed in DB01 but you can catch the locks in SM12 (Enqueue) via the ENQUEUE_READ FM which shows the current locks

Former Member
0 Kudos

Hi

Thank you for immediate response...

but i really interested in reading DBLOCKS as in DB01

Any help would be really appreciated...

Regards

SAM