Re: Convert ROWID from Leaf Block Dump

From: Michael Cunningham <napacunningham_at_gmail.com>
Date: Tue, 23 Feb 2016 09:37:45 -0800
Message-ID: <CAPt39ttiM1M1riKseb14pAp8LE7=Eb2i5Ag5vQRgV5vtfYAWdQ_at_mail.gmail.com>



Thanks Jonathan, that got me much closer.

From the rowid entry in the Leaf Block Dump col 1; len 6; (6): 01 00 02 f2 00 1e

I see that:

    "00 1e" = 30 which is the row# in the block     "02 f2" = 754 which is the block#

I'm not sure what the "01 00" converts to or if it is actually 2 different pieces of my puzzle.

If my understanding is correct, I still need object_number and relative_fno to create a usable ROWID. I can't find anywhere in the index treedump, or any blockdump's where I can come up with that information.

My dilemma is how exactly does the Leaf Block provide the information to generate the ROWID.

Any further help will be greatly appreciated.

Michael

On Tue, Feb 23, 2016 at 8:51 AM, Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk
> wrote:

>
>
> Look at package dbms_rowid.
> 1 select
> 2 dbms_rowid.rowid_object('AAAFDFAAEAAAALyAAe') data_object_id ,
> 3 dbms_rowid.rowid_relative_fno('AAAFDFAAEAAAALyAAe')
> ts_relative_file,
> 4 dbms_rowid.rowid_block_number('AAAFDFAAEAAAALyAAe') block_number,
> 5 dbms_rowid.rowid_row_number('AAAFDFAAEAAAALyAAe') row_in_block
> 6* from dual
> SQL> /
>
> DATA_OBJECT_ID TS_RELATIVE_FILE BLOCK_NUMBER ROW_IN_BLOCK
> -------------- ---------------- ------------ ------------
> 20677 4 754 30
>
> The file and block number procedures have a second parameter to tell them
> whether the object is in a smallfile or bigfile tablespace (default small);
> there's also an "absolute" file number procedure but you have to know the
> schema and object name - which you can derive from the data_object_id.
>
>
> Regards
> Jonathan Lewis
> http://jonathanlewis.wordpress.com
> _at_jloracle
> ------------------------------
> *From:* oracle-l-bounce_at_freelists.org [oracle-l-bounce_at_freelists.org] on
> behalf of Michael Cunningham [napacunningham_at_gmail.com]
> *Sent:* 23 February 2016 16:35
> *To:* oracle-l_at_freelists org
> *Subject:* Convert ROWID from Leaf Block Dump
>
> Hello list, does anyone know how to convert the rowid info in a leaf block
> dump to a real rowid?
>
> For example, I have this
> col 1; len 6; (6): 01 00 02 f2 00 1e
>
> The rowid for the row in the table is AAAFDFAAEAAAALyAAe.
>
> I'm looking for the formula to do the conversion. Or at least something
> that gets me to this.
>
> I'll keep looking for the solution, but I thought I'd ask.
>
> --
> Michael Cunningham
>

-- 
Michael Cunningham

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 23 2016 - 18:37:45 CET

Original text of this message