当前位置:首页 > 数据库 > Oracle

oracle 11g归档日志研究_1

fh0 { uint32_t unknown0; uint32_t unknown1; uint32_t unknown2; uint32_t unknown3; uint32_t unknown4; uint32_t blocksize; //每块大小(字节), 512/1024... uint32_t blockcount; //当前文件的总块数(不包括第一块) uint32_t unknown5; uint8_t nouse[480]; }Redo_fh0; Redo_fh0

 

第2块的数据格式:

oracle 11g归档日志研究_1 - 文章图片oracle 11g归档日志研究_1 - 文章图片
typedef struct scn {
    uint32_t scnbase;
    uint16_t scnwrapper;
    uint16_t filler;
}Redo_scn;

typedef struct fh1 {
    Redo_bh blockhead;
    uint32_t unknown0;
    uint32_t comvsn;        //Compatibility Vsn
    uint32_t dbid;
    uint8_t dbname[8];      //"ORCL"(sid)
    uint32_t controlseq;
    uint32_t filesize;
    uint32_t blocksize;
    uint16_t filenum;
    uint16_t filetype;
    uint32_t activid;
    uint8_t nouse0[36];     //0
    uint8_t descript[64];
    uint32_t nab;           //next available block
    uint32_t resetcount;
    Redo_scn resetscn;
    uint32_t hws;           //后3字节为0
    uint32_t thread;
    Redo_scn lowscn;
    uint32_t lowscntime;
    Redo_scn nextscn;
    uint32_t nextscntime;
    uint32_t unknown11;
    Redo_scn enablescn;
    uint32_t enablescntime;
    Redo_scn thrclosescn;
    uint32_t thrclosescntime;
    uint8_t unknown13[52];
    Redo_scn prevresetscn;
    uint32_t prevresetcount;
    uint8_t nouse1[152];    //0
    uint8_t unknown14[36];
    uint8_t nouse2[28];     //0
}Redo_fh1;
Redo_fh1

 

第1块与其他块完全不同,它不含有块头,也不被包含在块总数之内。从第2块开始,所有的数据块的前16个字节为块头,格式:

oracle 11g归档日志研究_1 - 文章图片oracle 11g归档日志研究_1 - 文章图片
typedef struct bh {
    uint32_t signature;     //签名
    uint32_t blocknum;      //块号
    uint32_t sequence;      //顺序号
    uint16_t offset;        //最高位1需过滤掉
    uint16_t checksum;
}Redo_bh;
Redo_bh

 

下面详细研究归档日志。

oracle 11g归档日志研究_1

标签:

本文系统来源:http://www.cnblogs.com/linux-c/p/5207110.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐