Oracle 11g archive log study _ 2, oracle11g ARCHIVE _ 2
Starting from Block 1, the block stores all oracle Operation Records. The block structure is very simple. There are only blocks and blocks:
Typedef struct bk {Redo_bh blockhead; uint8_t buf [496];} Redo_bk; Redo_bk
The block header is consistent with the one described in the previous article:
Typedef struct bh {uint32_t signature; // signature uint32_t blocknum; // block number uint32_t sequence; // The serial number uint16_t offset; // The maximum bit 1 needs to be filtered out;} Redo_bh;
The offset in the block header indicates the location of the 1st records in the current block. For example, the value of the offset in the 11g is 80 00 (the x86 architecture cpu is in a small order, open it as 00 80 in the hexadecimal editor. In this case, the first 1 needs to be filtered out (that is, & 0x7FFF). It may have the following values:
Offset = 0: This block does not contain records for restarting. It may not contain data (for example, 2nd blocks ), or the block is fully occupied by the previous block (Cross block ).
Offset> = 10: mark the start position of the record in the block. The position includes the block header, and the block header is 16 bytes (hexadecimal 10). That is, if offset = 10, the header is immediately followed by the record header. Guess that the offset value should be less than 512-16-the record header (the minimum value should be 24 bytes) = 472 bytes.
After the starting position of the block + offset, it is a normal operation record. The block only serves to divide the storage space. After combining the block according to the offset, you can obtain the complete operation record. The structure of the Operation record (the beginning of egg pain ):
One record head)
There are many changes in each change:
A change Header
A change vector table
A group of change data arranged according to the vector table
The following is a detailed study record.