to find the rowid [message #326431] |
Wed, 11 June 2008 07:48 |
srini_thiru
Messages: 133 Registered: May 2008
|
Senior Member |
|
|
Hi to all,
i have used the below script to find locked row in a particular table.
===========================
Show which row is locked
===========================
select do.object_name
, row_wait_obj#
, row_wait_file#
, row_wait_block#
, row_wait_row#
, dbms_rowid.rowid_create (1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#,
ROW_WAIT_BLOCK#, ROW_WAIT_ROW#)
from v$session s
, dba_objects do
where sid=&sid
and s.ROW_WAIT_OBJ# = do.OBJECT_ID
/
=========================================
Then select the row with that rowid...
=============================================
select * from <table> where rowid=<rowid>;
The response i got is,
============================================================
OBJECT_NAME ROW_WAIT_OBJ# ROW_WAIT_FILE# ROW_WAIT_BLOCK# ROW_WAIT_ROW# DBMS_ROWID.ROWID_CREATE(1,ROW_WAIT_OBJ#,ROW_WAIT_FILE#,ROW_WAIT_BLOCK#,ROW_WAIT_ROW#)
==============================================================
BARCODE 10948 10 0 0 AAACrEAAKAAAAAAAAA
=================================================================
Table name is BARCODE i like to know what is the corresponding rowid..
Thanks in Advance,
Seenu
|
|
|
|