L1, L2, L3 block function:--easy to find data blocks.
There is a pointer to the L3 in the L1, L2 has a pointer to L3, and a pointer and state for multiple blocks of data in the L3.
1. In each L3, there are multiple L2 addresses (the first L3 is a segment header).
2. In each L2, there are multiple L1 addresses.
3. In each L1, there are multiple data block addresses.
Oracle supports up to three-level bitmaps.
The first level bitmap is used to manage the use of specific blocks of data.
The second-level bitmap block records the address of a first-level bitmap block.
A level three bitmap block records the address of a level two bitmap block. Segment Heade can manage the space of objects with a large amount of data, it is difficult to have another three-level bitmap block.
1. How to find the segment head--The first L3 block bys@ bys3>create tablespace test2 datafile '/u01/oradata/bys3/test22.dbf ' size 10m;
Tablespace created.
bys@ bys3>create table test2 (AA varchar2 (a)) tablespace test2;
Table created.
bys@ Bys3>insert into test2 values (789);
1 row created.
bys@ bys3>commit;
Commit complete.
bys@ Bys3>select Dbms_rowid. Rowid_block_number (ROWID), Dbms_rowid. ROWID_RELATIVE_FNO (ROWID), AA from Test2;
Dbms_rowid. Rowid_block_number (ROWID) Dbms_rowid. ROWID_RELATIVE_FNO (ROWID) AA
------------------------------------ ------------------------------------ ----------
131 7 789
bys@ bys3>select header_block,header_file fromdba_segments where segment_name= ' TEST2 ' and owner= ' BYS ';
Header_block header_file-------Find a segment header from this statement
------------ -----------
130 7
bys@ Bys3>select object_id,data_object_id from dba_objects where object_name= ' TEST2 ' and owner= ' BYS ';
OBJECT_ID data_object_id
---------- --------------
23199 23199
bys@ Bys3>alter Table Test2 allocate extent (size 960k);
Table altered.
bys@ bys3>alter System Dump datafile 7 block 130;
System altered.
bys@ bys3>select value from V$diag_info where name like ' de% ';
VALUE
----------------------------------------------------------------------------------------------------
/u01/diag/rdbms/bys3/bys3/trace/bys3_ora_4215.trc
################
Chito--The first L3 block interpretation: Start dump data blocks Tsn:7 file#:7 minblk 130 maxblk 130
Blocks dump from cache:---This is the buffer cache block header information, reference: http://blog.csdn.net/haibusuanyun/article/details/17525523
Dump of buffer cache at level 4 for tsn=7 rdba=29360258
BH (0X20FE6D64) file#: 7 rdba:0x01c00082 (7/130) class:4 ba:0x20cb6000
Set:3 pool:3 bsz:8192 bsi:0 sflg:1 pwc:0,0
dbwrid:0 obj:23199 objn:23199 Tsn:7 afn:7 hint:f
Hash: [0x2a39d804,0x2a39d804] LRU: [0x217f7ccc,0x21befb08]
Lru-flags:on_auxiliary_list
CKPTQ: [NULL] FILEQ: [null] OBJQ: [0x21befb20,0x22beab34] Objaq: [0x2443a408,0x2
1BEFB28]
St:xcurrent md:null fpin: ' Ktswh03:ktscts ' tch:2
Flags:block_written_once Redo_since_read
Lrba: [0x0.0.0] LSCN: [0x0.0] HSCN: [0XFFFF.FFFFFFFF] Hsub: [1]
Block dump from disk:--The following is the contents of the physical data file
Buffer Tsn:7 rdba:0x01c00082 (7/130)
scn:0x0000.0082b051 seq:0x01 flg:0x04 tail:0xb0512301