oracle数据库数据文件内部结构详细解释

时间:2011-08-22 09:07来源:服务器数据恢复 作者:www.jdcok.com

oracle8 9 的数据文件内部格式同理。

 

10.1.0~lgone@ONE.LG.OK> create table a(v varchar2(4000)) TABLESPACE t;
 
 Table created.
 
 10.1.0~lgone@ONE.LG.OK> insert into a values('a');
 
 1 row created.
 
 
 Start dump data blocks tsn: 17 file#: 5 minblk 10 maxblk 10
 buffer tsn: 17 rdba: 0x0140000a (5/10)  
    //// buffer tsn:       
          数据文件对应的 tablespace 的 number   这只是dump文件中记录的数据而已
          block 中是没有记录 tablespace 的 number 的 
 
 scn: 0x0000.0043890e seq: 0x05 flg: 0x02 tail: 0x890e0605
 frmt: 0x02 chkval: 0x0000 type: 0x06=trans data
 Block header dump:  0x0140000a
  Object id on Block? Y
  seg/obj: 0xd254  csc: 0x00.43890a  itc: 2  flg: O  typ: 1 - DATA
      fsl: 0  fnx: 0x0 ver: 0x01
 
  Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
 0x01   0x0004.00c.00001850  0x00801496.07b9.01  --U-    1  fsc 0x0000.0043890e
 0x02   0x0000.000.00000000  0x00000000.0000.00  ----    0  fsc 0x0000.00000000
 
 data_block_dump,data header at 0x87e125c
    ////  data_block_dump,data header at 0x87e125c
          其实这个block不是直接从 data buffer 中 dump 出来的这个表示真正dump时 block 的数据区的起始位置
          也就是下面这部分开始的位置
         
 ===============        ////  tsiz:    hsiz:   pbl:   bdba: 在数据文件都是没有存储的
 tsiz: 0x1fa0           //// Total data area size 
                      8k的block: 8192-20(block head)-24(Transaction Header)-24*2(一个事务条)-4(block tail)=8096(0x1fa0)
 hsiz: 0x14             //// Data header size  数据块头20个字节+数据块尾4个字节=24字节(0x14)
 pbl: 0x087e125c        //// Pointer to buffer holding the block
 bdba: 0x0140000a
      76543210
   
 flag=--------
 ntab=1
 nrow=1
 frre=-1
 fsbo=0x14
 fseo=0x1f9b
 avsp=0x1f83
 tosp=0x1f83
 0xe:pti[0]  nrow=1  offs=0
 0x12:pri[0] offs=0x1f9b
 block_row_dump:
 tab 0, row 0, @0x1f9b
 tl: 5 fb: --H-FL-- lb: 0x1  cc: 1
 col  0: [ 1]  61
 end_of_block_dump
 End dump data blocks tsn: 17 file#: 5 minblk 10 maxblk 10
 

--------------------------------------------------------------------------------

 

block 坏掉了还可以报:
     ORA-600 (4519) Cache layer block type is incorrect
     ORA-600 (4393) Check for Type for Segment header with free list
     ORA-600 (4136) Check Rollback segment block
     ORA-600 (4154) Check Rollback segment block
 
     Ora-600[kcbzpb_1],[d],[kind],[chk] gets signaled when the block got corrupted in memory.
     The only way it should be bad is if a stray store into memory destroyed the header or tail.
     d = blocknumber, kind= kind of corruption detected,chk = checksum flag
 
     ora-600[3398] and ora-600[3339] 
     ora-600[3398] is not in oracle 8.
     ora-600[3398] means it failed a verification check before writing back to disk,  so it must
         be an in-memory corruption.
     ora-600[3339] comes with ora-1578 and means either disk corruption or in memory corruption after read.
     ora-600 [3339] has been removed from 7.2+
     From 7.2+  ora-600 [3398] has become ora-600 [3374] with some checks added.
 
 2进制存储格式
                ALTER SESSION SET EVENTS '10289 trace name context forever, level 1';
                ALTER SESSION SET EVENTS '10289 trace name context off';
 


oracle数据库数据文件内部结构详细解释 www.jdcok.com/anli/5/1244.html
------分隔线----------------------------
分享到: