一致读步骤

一致读的步骤:

1. Read the Data Block.

  读数据块

2. Read the Row Header.

  读行头

3. Check the Lock Byte to determine whether there's an ITL entry.

  检查lock字节是否有事务槽

4. Read the ITL entry to determine the Transaction ID (Xid).

  读事务槽,检查事务id

5. Read the Transaction Table using the Transaction ID. If the transaction has been committed and has a System Commit Number less than the query's System Change Number, update the status of the block (block cleanout) and start over at step 1.

   用事务id读取事务表,如果事务已经提交,系统提交的NUMBER小于查询的SCN,修改块的状态(块清除),回到步骤1

6. Read the last undo block (Uba).

  读取最后的undo

7. Compare the block transaction ID with the transaction table transaction ID. If the Transaction ID in the undo block doesn't equal the Transaction ID from the Transaction Table, then issue ORA-1555, Snapshot Too Old.

  比较表的事务id和块的事务id,如果在undo块中的事务id不等于事务表中的,然后报ORA-1555快照过久的错误。

8. If the Transaction IDs are identical, make a copy of the data block in memory. Starting with the head undo entry, apply the changes to the copied data block.

  如果事务id一致,拷贝数据导内存中,从undo头的条目开始,将回滚内容运用到数据块中。

9. If the tail undo entry (the actual first undo entry in the chain, or the last in the chain going backwards!) indicates another data block address, read the indicated undo block into memory and repeat steps 7 and 8 until the undo entries don't contain a value for the data block address.

  如果undo条目尾部指示其他数据库的地址,读取指向的undo块到内存,重复步骤78,直到undo条目不包括其他数据块的地址。

10. When there's no "previous data block address," the transaction has been completely undone.

  当没有先前的数据块地址,这个事务已经完成undo.

11. If the undo entry contains: 如果undo条目包括

a. a pointer to a previous transaction undo block address, read the Transaction ID in the previous transaction undo block header and read the appropriate Transaction Table entry. Return to step 5.

指针指向先前事务的undo块地址,在先前事务undo块头部读取事务id,读取合适的事务表条目,回到第5步。

b. an ITL record, restore the ITL record to the data block. Return to step 4. 一个事务槽记录,为数据块恢复事务槽,回到第4步。

http://www.itpub.net/thread-131231-1-1.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值