Oracle8 has introduced a change with the data block cache header format. The basic idea is that incarnation and sequence numbers stored in the cache header have been replaced with an SCN number and sequence number. The size of the cache header has remained 20 bytes. The size of the block trailer is still 4 bytes. Only the format of the cache header and the trailer has changed. Oracle7 Implementation ~~~~~~~~~~~~~~~~~~~~~~ The current Oracle7 implementation stores the incarnation and sequence number in the cache header of each data block to determine the current version of the block. A compressed version of the incarnation/sequence is maintained at the end of the data block. The incarnation and sequence numbers are each 4 byte values. The low-order 2 bytes of each value are stored as the last 4 bytes of the data block. This information is used to detect media corruption when reading the block for normal operations or during recovery, or when validating the block. It allows for a consistency check to ensure the top of the block is in sync with the bottom of the block. See [NOTE:33242.1] for more details on the Oracle7 format. Oracle8 Implementation ~~~~~~~~~~~~~~~~~~~~~~ The basic idea is to store the current redo generating SCN in the cache header when making a change to a block. Since multiple changes to a block can be made at the same SCN, a sequence number is also stored in the cache header to differentiate between different changes at the same SCN. The sequence number is increased each time a change is made at the same SCN. The sequence number is reset to 1 when making a change at a higher SCN than the SCN currently in the block. Oracle8 data block layout ------------------------- | | | | | | | | | | | | | | | | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 | +-------+-------+---------------+---------------+---------------+ |Typ|Fmt|Filler | RDBA | SCNBase |SCNWrap|Seq|Flg| |-------+-------+---------------+---------------+---------------| |ChkVal |Filler | <------ | |-------+-------+ | : Body of : : Data Block : : : | +---------------| | ---------> | Tail | +---------------------------------------------------------------+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | | | | | | | | | | | | | | | | | | The bytes in the header are defined as: Typ Block Type (defined in k.h). Fmt Block format. In Oracle8 this is 2, converted on-the-fly. Filler Not used currently. RDBA Relative database address of the block. SCNBase SCN Base SCNWrap SCN Wrap Seq Sequence number. Incremented for every change made to the block at the same SCN. Flg Flag (defined in kcbh.h) ChkVal Optional check value for the block. Set so that an xor of all the ub2 values in the block equals zero. This may require the value to be zero (unlike Oracle7). ChkVal will be verified only if KCBHFCKV is set in the Flg field. - always for file header blocks - if the init.ora <parameter:DB_BLOCK_CHECKSUM> is set. Tail Consistency information used to verify the beginning and the end of the block are of the same version. Lower order 2 bytes of SCNBase, plus block Type, plus SCN Seq number. Migration to the New Format ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Data block cache headers will be upgraded to the new Oracle8 format on-the-fly when the block is read into the cache. Oracle8 will do this automatically for every block that is read into the cache during normal operation. The on-disk copy is not updated unless the block becomes dirty. Soft Corrupt in Oracle8 ~~~~~~~~~~~~~~~~~~~~~~~ Soft corrupt blocks in Oracle8 have: Seq# is 0xff flg is 0x00
Data Block Cache Header Format Changes (Oracle8 Physical layout)
原创
©著作权归作者所有:来自51CTO博客作者maclean_007的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Oracle11g Data Guard--创建物理备库
Oracle 11g Data Guard 管理
oracle hive SQL -
Oracle Data Gurad Physical Standby 相关说明
Oracle Data Guard, 分逻辑Standby和物理Standby。 下面讲的是物理Standby 环境的搭
oracle 数据库 archive file parallel -
ORACLE8的分区管理
,择要:本篇文章先容了ORACLE数据库的新特征—分区管理,并用例子阐明运用设施。,枢纽词:ORACLE,分区,一、分区概述:,
ORACLE 分区 oracle 数据 表空间