Home » RDBMS Server » Server Administration » Getting Actual ROWID
Getting Actual ROWID [message #233630] Fri, 27 April 2007 00:38 Go to next message
gajini
Messages: 259
Registered: January 2006
Senior Member
Hi,

I want to find the row for which a session is waiting,here is the query to find the rowid,

SQL> select do.object_name,
2 row_wait_obj#, row_wait_file#, row_wait_block#, row_wait_row#,
3 dbms_rowid.rowid_create (1,ROW_WAIT_OBJ#,ROW_WAIT_FILE#,ROW_WAIT_BLOCK#,ROW_WAIT_ROW#)
4 from v$session s, dba_objects do
5 where sid=10
6 and s.ROW_WAIT_OBJ# = do.OBJECT_ID ;

OBJECT_NAME ROW_WAIT_OBJ# ROW_WAIT_FILE# ROW_WAIT_BLOCK# ROW_WAIT_ROW# DBMS_ROWID.ROWID_C
-------------------- ------------- -------------- --------------- ------------- ------------------
EMP 34768 1 53714 0 AAAIfQAABAAANHSAAA

When i queried for that ROWID,it gave the following error,

SQL> select * from emp where rowid='AAAIfQAABAAANHSAAA';
select * from emp where rowid='AAAIfQAABAAANHSAAA'
*
ERROR at line 1:
ORA-01410: invalid ROWID

I checked the rowid by using the below query and found that ROWID returned by procedure DBMS_ROWID differs by only one character thats why it's giving the error.

ROWID given by DBMS_ROWID = AAAIfQAABAAANHSAAA
Actual ROWID = AAAIfYAABAAANHSAAA

My oracle version is 9.2.0.8.

SQL> select rowid,id from scott.emp;

ROWID ID
------------------ ----------
AAAIfYAABAAANHSAAA 1
AAAIfYAABAAANHSAAB 2

How to solve this problem?What i've to do to get the actual rowid?

Thanks....
Re: Getting Actual ROWID [message #233641 is a reply to message #233630] Fri, 27 April 2007 01:17 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/
'AAAIfQAABAAANHSAAA' is not a rowid, it is a string.
Use CHARTOROWID function.

2/ Are you sure your session is currently waiting? and waiting on a row?

Regards
Michel
Previous Topic: Running .exe
Next Topic: Configuring Automatic Shared Memory Management - 10g
Goto Forum:
  


Current Time: Sun Dec 04 02:27:56 CST 2016

Total time taken to generate the page: 0.11724 seconds