Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Obtain the ROWID from a index block

Re: Obtain the ROWID from a index block

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Thu, 03 Mar 2005 05:06:18 GMT
Message-ID: <eXwVd.57422$nC5.34006@twister.nyroc.rr.com>

"Andy Hassall" <andy_at_andyh.co.uk> wrote in message news:4pgc21l3fgrash3m3a6dh22hr85irgeu0u_at_4ax.com... -snip-
> Six bytes is too short for a ROWID, but the start of a ROWID is the data
> object number. Since this'll be the same for all the index entries, i.e. the
> table that the index is on, it looks like it's omitted here.
>
> Dumping the ROWID of the single row from the table that the index that my
> block dump above is in seems to back this up:
>
> SQL> select dump(rowid,16) from t;
>
> DUMP(ROWID,16)
> --------------------------------------------------------------------------------
> Typ=69 Len=10: 0,0,b0,45,1,1,9e,a2,0,0
>
> The trailing bytes (0x01019ea20000) match that from the block dump.
> The leading bytes (0x0000b045) are 45125 in decimal, and:
>
> SQL> select object_id from user_objects where object_name = 'T';
>
> OBJECT_ID
> ----------
> 45125
>
> --
> Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

Andy,

Although, mostly one would find object_id = data_object_id However, the query should probably be:

select data_object_id from user_objects where object_name = 'T';

... since start of rowid is data object id (as you initially stated too)...

Thanks,

Anurag Received on Wed Mar 02 2005 - 23:06:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US