Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Obtain the ROWID from a index block
"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
![]() |
![]() |