Starting with the 3rd block, the block stores all of Oracle's operational records. The block structure is simple, with only the size and block body:
struct BK { redo_bh blockhead; uint8_t buf[496];} REDO_BK;
REDO_BK
The size is the same as the one described in the previous article:
struct BH { uint32_t signature; // Signature uint32_t Blocknum; // Block number uint32_t sequence; // Sequence Number uint16_t offset; // The highest bit 1 needs to be filtered out uint16_t Checksum;} REDO_BH;
REDO_BH
The offset in the header represents the position of the 1th record in the current block, in 11g for example, its value is x86 (the CPU of the architecture is small, with the 16 binary editor open to 00 80), at which point the first 1 needs to be filtered out (i.e. &0x7fff), it may have the following values:
offset = = 0: This block does not contain a restart record, there may be no data in this block (such as the 2nd block), or the block is completely occupied (across blocks).
Offset >= 10: Marks the beginning of the record in this block, the position is the size, and the size is 16 bytes (16 binary 10), that is, if the offset = = 10, the header is immediately after the size of the record. Guess that offset should be less than 512-16-the record header (the smallest should be 24 bytes) = 472 bytes.
Block starting position after the +offset, is the normal operation of the record, the block only play a role in the partition of storage space, the block in accordance with the combination of offset, you can obtain a complete record of operations. Structure of the Operation record (beginning of the egg ache):
A recording head (record header)
A lot of change, in each change:
A Change header
A Change vector table
A set of change data arranged in a vector table
The following is a detailed study of what is recorded.
Oracle 11g Archive Log Research _2