rowid issue of dumptree [message #557888] |
Sun, 17 June 2012 02:24 |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
Dear all,
I dump a index tree and get the flowing infomation,and i want to transform the rowid to the ROWID of a row,how can i do?
alter session set events 'immediate trace name treedump level 70339';--index object
alter system dump datafile 4 block 251; -- index tree block
row#0[8010] flag: ------, lock: 2, len=13
col 0; len 2; (2): c1 03
col 1; NULL
col 2; len 6; (6): 01 00 00 f7 00 01 --rowid
row#1[8023] flag: ------, lock: 2, len=13
col 0; NULL
col 1; len 2; (2): c1 02
col 2; len 6; (6): 01 00 00 f7 00 00 -- rowid
----- end of leaf block dump -----
|
|
|
|
|
|
|
|
Re: rowid issue of dumptree [message #557938 is a reply to message #557931] |
Mon, 18 June 2012 02:09 |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
hi,
Michel,01 00 00 f7 00 01 transform to binary is 00000001 00000000 00000000 11110111 00000000 00000001
the file# is 00000001 00,decimal is 4
block# is 000000 00000000 11110111,decimal is 247
row# is 0000001,decimal is 1
but there is no object# of rowid,so we need to get the object_id of the table.
SQL> select object_id from dba_objects t
2 where owner='HXL'
3 and object_name='TB_INDEX_TEST';
OBJECT_ID
----------
70338
now get the rowid of the row
SQL> select
2 dbms_rowid.rowid_create(rowid_type => 1,
3 object_number => 70338,
4 relative_fno => 4,
5 block_number => 247,
6 row_number => 1
7 ) rid
8 from dual;
RID
------------------
AAARLCAAEAAAAD3AAB
SQL> select c1, c2 from hxl.TB_INDEX_TEST
2 where rowid='AAARLCAAEAAAAD3AAB';
C1 C2
---------- ----------
2
|
|
|
|
Re: rowid issue of dumptree [message #558164 is a reply to message #558157] |
Tue, 19 June 2012 23:22 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
I don't care about your test, I'm not intersted in investigating useless stuff and wasting my time.
The first step is to know the concepts, you did not pass this step, knowing each bit Oracle stores is silly, do you think you are better than T. Kyte and know more than him?
Once you will have studied and mastered the concepts then maybe it will be of some interest to know more of the inside, before... but wait I already told this and you, you didn't answer the question "why do you want to know this?".
Regards
Michel
|
|
|