Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: enqueue wait events, locks and the meaning of id1/id2
I don't have access to Oracle 8.0.5 so couldn't check if the ROW_WAIT_OBJ#, ROW_WAIT_FILE#, ROW_WAIT_BLOCK# columns exist in V$SESSION. If these columns are there, it would already have all the information required to understand the TX enq row lock waits, no?
-V
on 1/28/2004 7:34 AM Brian Peasland said the following:
>>I modified the query a bit, to this:
>>SELECT
>> TRUNC(id1/POWER(2,16)) rbs,
>> BITAND(id1,65535)+0 slot, id2 seq
>>FROM v$lock
>>WHERE type='TX'
>>AND lmode = 6
>>
>>This gives me the following output:
>> RBS SLOT SEQ
>>---------- ---------- ----------
>> 6 80 1195257
>> 6 70 1192089
>> 6 42 1193083
>> 5 72 1060150
>> 5 96 1055042
>> 6 16 1190901
>> 5 14 1056651
>> 5 9 1058258
>> 6 1 1196554
>> 5 51 1057005
>> 5 1 1056275
>>
>> RBS SLOT SEQ
>>---------- ---------- ----------
>> 6 9 1189959
>>
>>
>
>You might also want to include the SID in your query of V$LOCK so you
>know which session these belong to. Also, the LMODE and REQUEST columns
>are useful. If LMODE != 0, then a locked is obtained. If REQUEST!=0,
>then the session is waiting on a lock.
>
>
>
>>Is it possible to join this info with e.g. v$transaction to find the object?
>>
>>
>
>Not to find the object. But the RBS, SLOT, and SEQ columns above match
>the XIDUSN, XIDSLOT, and XIDSQN columns of V$TRANSACTION, respectively.
>
>Alternatively, to find the object, query V$LOCKED_OBJECT. The RBS, SLOT,
>and SEQ columns above match the XIDUSN, XIDSLOT, and XIDSQN columns of
>V$LOCKED_OBJECT, respectively. From there, you should be able to get the
>OBJECT_ID, which maps to DBA_OBJECTS.
>
>
>HTH,
>Brian
>
>
>
>
Received on Wed Jan 28 2004 - 12:42:35 CST
![]() |
![]() |