zt_RBA-redo block address

如下概念非常重要,一定要仔细理解

 

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)

即:日志文件序列号4字节

     日志文件块编号4字节

     日志文件块中自重作日志记录条目开始偏移2byte字节

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.
   上述的rba即重作日志记录条目地址有时不一下唯一,因为以resetlogs模式打开数据库时,日志文件序列号会重置为1

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,仅仅是哪一个时刻的重作数据块编号

The low and high RBAs for dirty buffers can be seen in X$BH. (There is also a recovery RBAwhich 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.
  查询x$bh可以获取低rba和高rba
  它也是实例恢复时,pmon进程进行恢复工作,记录部分块恢复的进度;
 而增量和目标rba和磁盘rba你可以查看xkccp
 全量检查点rba自x$kccrt可以看到此内容

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-751510/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-751510/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值