Home » RDBMS Server » Server Administration » to find the rowid
to find the rowid [message #326431] Wed, 11 June 2008 07:48 Go to next message
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

Re: to find the rowid [message #326435 is a reply to message #326431] Wed, 11 June 2008 08:25 Go to previous message
Michel Cadot
Messages: 68675
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Database Concepts
Chapter 26 Native Datatypes
Section Overview of ROWID and UROWID Datatypes


DBMS_ROWID

Regards
Michel
Previous Topic: Connectivity Error Oracle 8i in windows server 2003
Next Topic: Oracle 8.1.7 not started in windows advance server 2000 / 2003
Goto Forum:
  


Current Time: Mon Sep 09 02:14:03 CDT 2024