ITPub博客

首页 > 数据库 > Oracle > oracle_bbed.Datafile.Header_System.数据文件头信息

oracle_bbed.Datafile.Header_System.数据文件头信息

原创 Oracle 作者:wzhalal 时间:2016-03-25 12:00:36 0 删除 编辑
BBED> show
        FILE#           1
        BLOCK#          1
        OFFSET          0
        DBA             0x00400001 (4194305 1,1)
        FILENAME        /u01/app/oracle/oradata/sunner/system01.dbf
        BIFILE          bifile.bbd
        LISTFILE        /home/oracle/file.txt
        BLOCKSIZE       8192
        MODE            Edit
        EDIT            Unrecoverable
        IBASE           Dec
        OBASE           Dec
        WIDTH           80
        COUNT           512
        LOGFILE         log.bbd
        SPOOL           No


BBED> map
 File: /u01/app/oracle/oradata/sunner/system01.dbf (1)
 Block: 1                                     Dba:0x00400001
------------------------------------------------------------
 Data File Header

 struct kcvfh, 676 bytes                    @0      

 ub4 tailchk                                @8188 

MAP[/v] [ DBA | FILENAME | FILE | BLOCK ]
显示指定位置的头尾 offset



 BBED> p kcvfh                                        
struct kcvfh, 676 bytes            @0                   --  文件头kcvfh 676 bytes
   struct kcvfhbfh, 20 bytes       @0                   --  结构kcvfhbfh 20 bytes
      ub1 type_kcbh                @0     0x0b          --  block header type 11
      ub1 frmt_kcbh                @1     0xa2          --  format 162
      ub1 spare1_kcbh              @2     0x00          -- 
      ub1 spare2_kcbh              @3     0x00          --
      ub4 rdba_kcbh                @4     0x00400001    --  relative database block address
      ub4 bas_kcbh                 @8     0x00000000    -- 
      ub2 wrp_kcbh                 @12    0x0000        --
      ub1 seq_kcbh                 @14    0x01          --  序列 坏块标记为
0xff
      ub1 flg_kcbh                 @15    0x04(KCBHFCKV)--  标志
      ub2 chkval_kcbh              @16    0x76d2        --  块校验值
      ub2 spare3_kcbh              @18    0x0000        -- 
   struct kcvfhhdr, 76 bytes       @20                  --  结构kcvfhhdr 76 bytes
      ub4 kccfhswv                 @20    0x00000000    -- 
      ub4 kccfhcvn                 @24    0x0a200100    --
      ub4 kccfhdbi                 @28    0xa69be42f    -- dbid
      text kccfhdbn[0]             @32   S              --
      text kccfhdbn[1]             @33   U              --
      text kccfhdbn[2]             @34   N              --
      text kccfhdbn[3]             @35   N              --
      text kccfhdbn[4]             @36   E              --
      text kccfhdbn[5]             @37   R              --
      text kccfhdbn[6]             @38                  --
      text kccfhdbn[7]             @39                  --
      ub4 kccfhcsq                 @40    0x0000041b    -- controlfile sequence
      ub4 kccfhfsz                 @44    0x0000f000    -- blocks
      s_blkz kccfhbsz              @48    0x00          --
      ub2 kccfhfno                 @52    0x0001        -- 相对文件号
      ub2 kccfhtyp                 @54    0x0003        -- 文件形式
      ub4 kccfhacid                @56    0x00000000    --
      ub4 kccfhcks                 @60    0x00000000    --
      text kccfhtag[0]             @64                  --
      text kccfhtag[1]             @65                  --
      text kccfhtag[2]             @66                  --
      text kccfhtag[3]             @67                  --
      text kccfhtag[4]             @68                  --
      text kccfhtag[5]             @69                  --
      text kccfhtag[6]             @70                  --
      text kccfhtag[7]             @71                  --
      text kccfhtag[8]             @72                  --
      text kccfhtag[9]             @73                  --
      text kccfhtag[10]            @74                  --
      text kccfhtag[11]            @75                  --
      text kccfhtag[12]            @76                  --
      text kccfhtag[13]            @77                  --
      text kccfhtag[14]            @78                  --
      text kccfhtag[15]            @79                  --
      text kccfhtag[16]            @80                  --
      text kccfhtag[17]            @81                  --
      text kccfhtag[18]            @82                  --
      text kccfhtag[19]            @83                  --
      text kccfhtag[20]            @84                  --
      text kccfhtag[21]            @85                  --
      text kccfhtag[22]            @86                  --
      text kccfhtag[23]            @87                  --
      text kccfhtag[24]            @88                  --
      text kccfhtag[25]            @89                  --
      text kccfhtag[26]            @90                  --
      text kccfhtag[27]            @91                  --
      text kccfhtag[28]            @92                  --
      text kccfhtag[29]            @93                  --
      text kccfhtag[30]            @94                  --
      text kccfhtag[31]            @95                  --
   ub4 kcvfhrdb                    @96    0x00400179    -- 相关
   struct kcvfhcrs, 8 bytes        @100                 --
      ub4 kscnbas                  @100   0x00000009    -- file$.CRSCNBAS 
 creation SCN base
      ub2 kscnwrp                  @104   0x0000        -- file$.crscnwrp   creation SCN wrap
   ub4 kcvfhcrt                    @108   0x2184ef93    -- 创建时间
   ub4 kcvfhrlc                    @112   0x2ff9bad5    --
   struct kcvfhrls, 8 bytes        @116                 --
      ub4 kscnbas                  @116   0x4000ac47    --
      ub2 kscnwrp                  @120   0x0000        --
   ub4 kcvfhbti                    @124   0x00000000    --
   struct kcvfhbsc, 8 bytes        @128                 --
      ub4 kscnbas                  @128   0x00000000    --
      ub2 kscnwrp                  @132   0x0000        --
   ub2 kcvfhbth                    @136   0x0000        --
   ub2 kcvfhsta                    @138 0x2004(KCVFHOFZ)--
   struct kcvfhckp, 36 bytes       @484                 --
      struct kcvcpscn, 8 bytes     @484                 -- 当前检查点SCN
         ub4 kscnbas               @484   0x4004ab21    --
         ub2 kscnwrp               @488   0x0000        --
      ub4 kcvcptim                 @492   0x300152ff    -- 当前检查点时间
      ub2 kcvcpthr                 @496   0x0001        --
      union u, 12 bytes            @500                 --
         struct kcvcprba,12 bytes  @500                 --
            ub4 kcrbaseq           @500   0x0000000e    -- recover 需要的下一个日志序列号
            ub4 kcrbabno           @504   0x00000002    -- rba block no
            ub2 kcrbabof           @508   0x0010        -- rba bytes offset
      ub1 kcvcpetb[0]              @512   0x02          --
      ub1 kcvcpetb[1]              @513   0x00          --
      ub1 kcvcpetb[2]              @514   0x00          --
      ub1 kcvcpetb[3]              @515   0x00          --
      ub1 kcvcpetb[4]              @516   0x00          --
      ub1 kcvcpetb[5]              @517   0x00          --
      ub1 kcvcpetb[6]              @518   0x00          --
      ub1 kcvcpetb[7]              @519   0x00          --
   ub4 kcvfhcpc                    @140   0x00000088    -- scn of last change to the datafile
   ub4 kcvfhrts                    @144   0x300152fd    --
   ub4 kcvfhccc                    @148   0x00000087    -- time of the last chage to the datafile
   struct kcvfhbcp, 36 bytes       @152                 --
      struct kcvcpscn, 8 bytes     @152                 --
         ub4 kscnbas               @152   0x00000000    --
         ub2 kscnwrp               @156   0x0000        --
      ub4 kcvcptim                 @160   0x00000000    --
      ub2 kcvcpthr                 @164   0x0000        --
      union u, 12 bytes            @168                 --
         struct kcvcprba, 12 bytes @168                 --
            ub4 kcrbaseq           @168   0x00000000    --
            ub4 kcrbabno           @172   0x00000000    --
            ub2 kcrbabof           @176   0x0000        -- checkpoint count
      ub1 kcvcpetb[0]              @180   0x00          --
      ub1 kcvcpetb[1]              @181   0x00          --
      ub1 kcvcpetb[2]              @182   0x00          --
      ub1 kcvcpetb[3]              @183   0x00          --
      ub1 kcvcpetb[4]              @184   0x00          --
      ub1 kcvcpetb[5]              @185   0x00          --
      ub1 kcvcpetb[6]              @186   0x00          --
      ub1 kcvcpetb[7]              @187   0x00          --
   ub4 kcvfhbhz                    @312   0x00000000    --
   struct kcvfhxcd, 16 bytes       @316                 --
      ub4 space_kcvmxcd[0]         @316   0x00000000    --
      ub4 space_kcvmxcd[1]         @320   0x00000000    --
      ub4 space_kcvmxcd[2]         @324   0x00000000    --
      ub4 space_kcvmxcd[3]         @328   0x00000000    --
   word kcvfhtsn                   @332   0             --
   ub2 kcvfhtln                    @336   0x0006        --
   text kcvfhtnm[0]                @338  S              --
   text kcvfhtnm[1]                @339  Y              --
   text kcvfhtnm[2]                @340  S              --
   text kcvfhtnm[3]                @341  T              --
   text kcvfhtnm[4]                @342  E              --
   text kcvfhtnm[5]                @343  M              --
   text kcvfhtnm[6]                @344                 --
   text kcvfhtnm[7]                @345                 --
   text kcvfhtnm[8]                @346                 --
   text kcvfhtnm[9]                @347                 --
   text kcvfhtnm[10]               @348                 --
   text kcvfhtnm[11]               @349                 --
   text kcvfhtnm[12]               @350                 --
   text kcvfhtnm[13]               @351                 --
   text kcvfhtnm[14]               @352                 --
   text kcvfhtnm[15]               @353                 --
   text kcvfhtnm[16]               @354                 --
   text kcvfhtnm[17]               @355                 --
   text kcvfhtnm[18]               @356                 --
   text kcvfhtnm[19]               @357                 --
   text kcvfhtnm[20]               @358                 --
   text kcvfhtnm[21]               @359                 --
   text kcvfhtnm[22]               @360                 --
   text kcvfhtnm[23]               @361                 --
   text kcvfhtnm[24]               @362                 --
   text kcvfhtnm[25]               @363                 --
   text kcvfhtnm[26]               @364                 --
   text kcvfhtnm[27]               @365                 --
   text kcvfhtnm[28]               @366                 --
   text kcvfhtnm[29]               @367                 --
   ub4 kcvfhrfn                    @368   0x00000001    -- 相对文件号
   struct kcvfhrfs, 8 bytes        @372                 --
      ub4 kscnbas                  @372   0x00000000    --
      ub2 kscnwrp                  @376   0x0000        --
   ub4 kcvfhrft                    @380   0x00000000    --
 the time which the recovery
                                                         --
 of this file will be complete
   struct kcvfhafs, 8 bytes        @384                 --
      ub4 kscnbas                  @384   0x00000000    --
      ub2 kscnwrp                  @388   0x0000        --
   ub4 kcvfhbbc                    @392   0x00000000    --
   ub4 kcvfhncb                    @396   0x00000000    --
   ub4 kcvfhmcb                    @400   0x00000000    --
   ub4 kcvfhlcb                    @404   0x00000000    --
   ub4 kcvfhbcs                    @408   0x00000000    --
   ub2 kcvfhofb                    @412   0x000a        --
   ub2 kcvfhnfb                    @414   0x000a        --
   ub4 kcvfhprc                    @416   0x2ff9955d    -- prev checkpoint
   struct kcvfhprs, 8 bytes        @420                 --
      ub4 kscnbas                  @420   0x00083bee    --
      ub2 kscnwrp                  @424   0x0000        --
   struct kcvfhprfs, 8 bytes       @428                 --
      ub4 kscnbas                  @428   0x00000000    --
      ub2 kscnwrp                  @432   0x0000        --
   ub4 kcvfhtrt                    @444   0x00000000    --


查看需要视图
  我们在分析问题,查看性能是的时候,需查看特定v$,甚至是x$。
  通过SELECT * FROM v$fixed_view_definition 可以查找指定v$的x$来源。
  我们这里使用的表x$kcvfh:
  SQL> desc x$kcvfh;


Name          
-------------------  
 ADDR            --  Adderss 唯一标识
 INDX            --  Indx 表内序列
 INST_ID         --  Inst_id 实例ID
 HXFIL           --  十六进制的文件号
 HXONS           --  Online状态 0表示"offline",其他表示"Online"
 HXSTS           --  应该是状态标记(offline,值发生变化)
 HXERR           --  错误代码 0 null ...
 HXVER           --  format,indicates format of block  6,7,8 indicats oracle version 6,7,8 
                    -- 0 indicate not determined (the header could not be read)
 FHSWV           --  swap vsn
 FHCVN           --  compatible vsn
 FHDBI           --  database DBID
 FHDBN           --  database name
 FHCSQ           --  controlfile sequence number
 FHFSZ           --  current block size in blocks(bytes/block_size)
 FHBSZ           --  block size
 FHFNO           --  file number
 FHTYP           --  1 controlfile 2 redo file 3 validate db file, normal data index undo file
 FHRDB           --  root dba,occurs in file# 1 (bootstrap$)
 FHCRS           --  creation_time
 FHCRT           --  create timestamp
 FHRLC           --  resetlog_time
 FHRLC_I         --  resetlog count
 FHRLS           --  resetlogs_change#
 FHPRC           --  prev resetlogs timestamp

 FHPRC_I         --  prev resetlogs count
 FHPRS           --  prev resegtlog scn
 FHBTI           --  "begin backup" update the backup start
 FHBSC           --  "begin backup" system change number
 FHBTH           -- 
 "begin backup"  update  thread
 FHSTA           --   status of datafile,file# 1 is 8186 ,others is 4 ,indicates online status
 FHSCN           --  datafile_header checkpoint_change#
 FHTIM           --  checkpoint_time
 FHTHR           --  thread number
 FHRBA_SEQ       --  redo file sequence number
 FHRBA_BNO       --  redo file block number
 FHRBA_BOF       --  bytes offset:the bytes offset into the block at which the redo record start

 FHETB           --  extent bytes
 FHCPC           --  datafile checkpoint_count
 FHRTS           --  recover timestamp
 FHCCC           --  controlfile checkpoint count
 FHBCP_SCN       --  "hot backup" backup checkpoint scn
 FHBCP_TIM       --  "hot backup" backup timestamp
 FHBCP_THR       --  "hot backup" threads
 FHBCP_RBA_SEQ   --  "hot backup" redo file sequence number
 FHBCP_RBA_BNO   --  "hot backup" redo file block number
 FHBCP_RBA_BOF   -- 
 "hot backup" bytes offset
 FHBCP_ETB       --  "hot backup" extent bytes
 FHBHZ           --  begin hot backup file
 FHXCD           --  extent cache id
 FHTSN           --  tablespace number
 FHTNM           --  tablespace name
 FHRFN           --  relative file number
 FHAFS           --  absolute fuzzy scn:minimum pitr scn
 FHRFS           --  the scn which the recovery of this file will be complete

 FHRFT           --  the time which the recovery of this file will be complete
 HXIFZ           --  file is fuzzy(yes/no)
 HXNRCV          --  file need media recover(yes/no)
 HXFNM           --  datafile name
 FHPOFB          --  prev old file block
 FHPNFB          --  prev new file block
 FHPRE10         --  prev 10
 FHFIRSTUNRECSCN -- unrecoverable_change#
 FHFIRSTUNRECTIM -- unrecoverable_time
 HXLMDBA         -- space header:the amount of block is being used the amount of block is free
 HXLMLD_SCN      -- last deallocate scn

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28894640/viewspace-2063635/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-06-06

  • 博文量
    60
  • 访问量
    249721