如下概念非常重要,一定要仔细理解
Redo Byte Address (RBA)
- 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)
即:日志文件序列号4字节
日志文件块编号4字节
日志文件块中自重作日志记录条目开始偏移2byte字节
RBAs are used in the following important ways.
rba在如下几个方面经常 使用
With respect to a dirty block in the buffer cache, thelow RBAis the address of the redo for the first change that was applied to the block since it was last clean, and thehigh RBAis the address of the redo for the most recent change to have been applied to the block.
针对buffer cache中脏块,低rba即上次提交(上次块的状态为干净)首次变更操作的地址,而高rba即最近一次变更操作的地址;当然这二者皆是
对于重作日志条目对应的数据块的操作.
Dirty buffers are maintained on the buffer cache checkpoint queues in low RBA order. Thecheckpoint RBAis 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.Thetarget RBAis the point up to which DBWn should seek to advance the checkpoint RBA to satisfy instance recovery objectives.
buffer cache中的脏块或者脏缓冲,在通过检查点队列,自低rba顺序开始维护.什么是检查点rba?它是一个时间点,如果开启了增量检查点,dbwr进程自检查点队列从其最低的rba把脏缓冲写入到datafile.
否则,即是自上次全量检查点.
每隔3秒,检查点RBA会被复制到控制文件的检查占进度记录中.(我理解就是记录最新的检查点队列到底应用到哪个rba了).这样如果开始实例恢复时,如果需要,从控制文件中的检查点进度记录开始恢复.
目标rba又是什么呢?dbwr进程恢复一直进行到这个rba,实例即可以启动工作了.也就是说恢复到这儿,oracle就要以运转了,
Theon-disk RBAis 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.
on-disk rba大家认为是什么?这个用于lgwr进程.即:lgwr进程会把log buffer中的内容一直刷新到此rba,进入在线日志文件中.
dbwr进程不会把超过on-disk rba的一个数据块的high rba写入数据文件,如果这样,事务恢复或rollback不可能作到了.因为用于rollback的重作
经常和变更重作的重作日志条目一样.
The termsync RBAis 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.
同步rba一直用于lgwr进程同步操作.它不是一个全量的rba,仅仅是哪一个时刻的重作数据块编号
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-751510/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-751510/