Oracle Internals Notes
Redo Byte Address (RBA)
Recent entries in the redo thread of an Oracle instance are addressed using a 3-part redo byte address, or RBA. An RBA is comprised of
the log file sequence number (4 bytes)
the log file block number (4 bytes)
the byte offset into the block at which the redo record starts (2 bytes)
RBAs are not necessarily unique within their thread, because the log file sequence number may be reset to 1 in all threads if a database is opened with the RESETLOGS option.
RBAs are used in the following important ways.
With respect to a dirty block in the buffer cache, the low RBA is the address of the redo for the first change that was applied to the block since it was last clean, and the high RBA is the address of the redo for the most recent change to have been applied to the block.
Dirty buffers are maintained on the buffer cache checkpoint queues in low RBA order. The checkpoint RBA is the point up to which DBWn has written buffers from the checkpoint queues if incremental checkpointing is enabled -- otherwise it is the RBA of last full thread checkpoint. The checkpoint RBA is copied into the checkpoint progress record of the controlfile by the checkpoint heartbeat once every 3 seconds. Instance recovery, when needed, begins from the checkpoint RBA recorded in the controlfile. The target RBA is the point up to which DBWn should seek to advance the checkpoint RBA to satisfy instance recovery objectives.
The on-disk RBA is the point up to which LGWR has flushed the redo thread to the online log files. DBWn may not write a block for which the high RBA is beyond the on-disk RBA. Otherwise transaction recovery (rollback) would not be possible, because the redo needed to undo a change is always in the same redo record as the redo for the change itself.
The term sync RBA is sometimes used to refer to the point up to which LGWR is required to sync the thread. However, this is not a full RBA -- only a redo block number is used at this point.
The low and high RBAs for dirty buffers can be seen in X$BH. (There is also a recovery RBA which is used to record the progress of partial block recovery by PMON.) The incremental checkpoint RBA, the target RBA and the on-disk RBA can all be seen in X$TARGETRBA. The incremental checkpoint RBA and the on-disk RBA can also be seen in X$KCCCP. The full thread checkpoint RBA can be seen in X$KCCRT
-----------------------------------------------------------
answer1:
凑合着尝试意译看看,大家探讨
在buffer cache 中的dirty buffer 中要注意,low RBA 是指最近一次clean(block中已经不再有有用数据)后发生了第一次改变时的block的的redo的位置,high RBA 是最近一次发生改变时该block的redo的位置(low 和 high 是针对同一个block在不同时期发生了变化,变化之间没有被clean,可能还没有来得及被写入磁盘就又被更新了)。脏数据块在 检查点写队列里面,按照low RBA 排列,checkpoint RBA 标志DBWn已经从写队列里面写到磁盘了的buffers(表示写到了哪里)如果增量检查点是激活的(前一个检查点没有结束新的检查点又发生了),否则就是标志最近一次完整的检查点发生之后,checkpoint RBA 每3秒别写入控制文件一次,实例恢复的时候如果需要的话就从控制文件中的checkpoing RBA 开始,target RBA 是该checkpoint RBA 所处的没有完成的检查点的RBA,从这里开始就可以找到checkpoint RBA
With respect to a dirty block in the buffer cache, the low RBA is the address of the redo for the first change that was applied to the block since it was last clean, and the high RBA is the address of the redo for the most recent change to have been applied to the block.
Dirty buffers are maintained on the buffer cache checkpoint queues in low RBA order. The checkpoint RBA is the point up to which DBWn has written buffers from the checkpoint queues if incremental checkpointing is enabled -- otherwise it is the RBA of last full thread checkpoint. The checkpoint RBA is copied into the checkpoint progress record of the controlfile by the checkpoint heartbeat once every 3 seconds. Instance recovery, when needed, begins from the checkpoint RBA recorded in the controlfile. The target RBA is the point up to which DBWn should seek to advance the checkpoint RBA to satisfy instance recovery objectives.
On-disk RBA 是指LGWR 已经写到log file 中的位置,DBWn不能写一个block到磁盘,假如high RBA 高于ON-DISK RBA(因为这样的话恢复的时候有问题,这个时候DBWn就通知LGWR写日志文件,也就是写进磁盘的block的redo一定要先写进log file,这个很容易理解);否则事务恢复或者回滚将不可能,因为重做的时候需要 撤消信息,而撤消信息是和 重做信息放在一个重做记录里面的
The on-disk RBA is the point up to which LGWR has flushed the redo thread to the online log files. DBWn may not write a block for which the high RBA is beyond the on-disk RBA. Otherwise transaction recovery (rollback) would not be possible, because the redo needed to undo a change is always in the same redo record as the redo for the change itself.
Redo Byte Address (RBA)
Recent entries in the redo thread of an Oracle instance are addressed using a 3-part redo byte address, or RBA. An RBA is comprised of
the log file sequence number (4 bytes)
the log file block number (4 bytes)
the byte offset into the block at which the redo record starts (2 bytes)
RBAs are not necessarily unique within their thread, because the log file sequence number may be reset to 1 in all threads if a database is opened with the RESETLOGS option.
RBAs are used in the following important ways.
With respect to a dirty block in the buffer cache, the low RBA is the address of the redo for the first change that was applied to the block since it was last clean, and the high RBA is the address of the redo for the most recent change to have been applied to the block.
Dirty buffers are maintained on the buffer cache checkpoint queues in low RBA order. The checkpoint RBA is the point up to which DBWn has written buffers from the checkpoint queues if incremental checkpointing is enabled -- otherwise it is the RBA of last full thread checkpoint. The checkpoint RBA is copied into the checkpoint progress record of the controlfile by the checkpoint heartbeat once every 3 seconds. Instance recovery, when needed, begins from the checkpoint RBA recorded in the controlfile. The target RBA is the point up to which DBWn should seek to advance the checkpoint RBA to satisfy instance recovery objectives.
The on-disk RBA is the point up to which LGWR has flushed the redo thread to the online log files. DBWn may not write a block for which the high RBA is beyond the on-disk RBA. Otherwise transaction recovery (rollback) would not be possible, because the redo needed to undo a change is always in the same redo record as the redo for the change itself.
The term sync RBA is sometimes used to refer to the point up to which LGWR is required to sync the thread. However, this is not a full RBA -- only a redo block number is used at this point.
The low and high RBAs for dirty buffers can be seen in X$BH. (There is also a recovery RBA which is used to record the progress of partial block recovery by PMON.) The incremental checkpoint RBA, the target RBA and the on-disk RBA can all be seen in X$TARGETRBA. The incremental checkpoint RBA and the on-disk RBA can also be seen in X$KCCCP. The full thread checkpoint RBA can be seen in X$KCCRT
-----------------------------------------------------------
answer1:
凑合着尝试意译看看,大家探讨
在buffer cache 中的dirty buffer 中要注意,low RBA 是指最近一次clean(block中已经不再有有用数据)后发生了第一次改变时的block的的redo的位置,high RBA 是最近一次发生改变时该block的redo的位置(low 和 high 是针对同一个block在不同时期发生了变化,变化之间没有被clean,可能还没有来得及被写入磁盘就又被更新了)。脏数据块在 检查点写队列里面,按照low RBA 排列,checkpoint RBA 标志DBWn已经从写队列里面写到磁盘了的buffers(表示写到了哪里)如果增量检查点是激活的(前一个检查点没有结束新的检查点又发生了),否则就是标志最近一次完整的检查点发生之后,checkpoint RBA 每3秒别写入控制文件一次,实例恢复的时候如果需要的话就从控制文件中的checkpoing RBA 开始,target RBA 是该checkpoint RBA 所处的没有完成的检查点的RBA,从这里开始就可以找到checkpoint RBA
With respect to a dirty block in the buffer cache, the low RBA is the address of the redo for the first change that was applied to the block since it was last clean, and the high RBA is the address of the redo for the most recent change to have been applied to the block.
Dirty buffers are maintained on the buffer cache checkpoint queues in low RBA order. The checkpoint RBA is the point up to which DBWn has written buffers from the checkpoint queues if incremental checkpointing is enabled -- otherwise it is the RBA of last full thread checkpoint. The checkpoint RBA is copied into the checkpoint progress record of the controlfile by the checkpoint heartbeat once every 3 seconds. Instance recovery, when needed, begins from the checkpoint RBA recorded in the controlfile. The target RBA is the point up to which DBWn should seek to advance the checkpoint RBA to satisfy instance recovery objectives.
On-disk RBA 是指LGWR 已经写到log file 中的位置,DBWn不能写一个block到磁盘,假如high RBA 高于ON-DISK RBA(因为这样的话恢复的时候有问题,这个时候DBWn就通知LGWR写日志文件,也就是写进磁盘的block的redo一定要先写进log file,这个很容易理解);否则事务恢复或者回滚将不可能,因为重做的时候需要 撤消信息,而撤消信息是和 重做信息放在一个重做记录里面的
The on-disk RBA is the point up to which LGWR has flushed the redo thread to the online log files. DBWn may not write a block for which the high RBA is beyond the on-disk RBA. Otherwise transaction recovery (rollback) would not be possible, because the redo needed to undo a change is always in the same redo record as the redo for the change itself.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/266281/viewspace-495488/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/266281/viewspace-495488/