Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Who is locking a record (not just a table)
v$session gives you the record you are *waiting*.
Then you have to find the session that is holding
the object (found with column id1 of v$lock).
If no session are waiting for the row held, i don't
know if it is possible to get the rowid held.
Columns of v$session :
ROW_WAIT_OBJ#
Object ID for the table containing the ROWID specified in ROW_WAIT_ROW#
ROW_WAIT_FILE#
Identifier for the datafile containing the ROWID specified in ROW_WAIT_ROW#.
This column is valid only if the session is currently waiting for another
transaction to commit and the value of ROW_WAIT_OBJ# is non-zero.
ROW_WAIT_BLOCK#
Identifier for the block containing the ROWID specified in ROW_WAIT_ROW#. This
column is valid only if the session is currently waiting for another transaction
to commit and the value of ROW_WAIT_OBJ# is non-zero.
ROW_WAIT_ROW#
The current ROWID being locked. This column is valid only if the session is
currently waiting for another transaction to commit and the value of
ROW_WAIT_OBJ# is non-zero.
--
Have a nice day
Michel
S. Han <shan168_at_yahoo.com> a écrit dans le message :
84u8l5$ugn$1_at_nnrp1.deja.com...
> Hi,
>
> Is there any view in Oracle8 to display which user is locking what
> records? We are in the development of a VB6 application which requires
> to display userid who is currently locking the record. Such as:
>
> The reocrd is locked by USERID!
>
> V$session view can only provide object_id which doesn't go down to ROW
> level. Several users can access the same table but different rows.
>
> Any help will be appreciated!
>
> Steph
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Jan 05 2000 - 05:04:58 CST
![]() |
![]() |