表空间研究---Undo Tablespace(二)---ORA-01555

如何理解ORA-01555,看MOS:467872.1

延迟块清除:Delayed Block Cleanoutanout

一句话概括,数据库头纪录事务回滚段标记的标志位不会在commit发生时同步更新,一般情况会在下次有人touch这个block时去跟回滚段状态进行匹配验证,如果发现回滚段显示已经提交,此时才更新数据段头纪录。

可以参考:ORA-01555 "Snapshot too old" - Detailed Explanation (Doc ID 40689.1)

EXAMPLE:

     Time 1: Session #1 starts a query on table A

     Time 2: Session #2 updates row X in table A

     Time 3: The query from session #1 arrives at row X and discovers the last updated time

                    (based on the SCN number) of the row to be later than Time 1 ... so the UNDO or

                     LOB segments are used to get the read consistent view (before image) of the row

                     and then the query proceeds

     Time 4: Session #2 updates row Y in table A and then COMMITs (thus making it possible

                   for this transaction slot to be overwritten)

     Time 5: Session #2 updates row Z in table B and COMMITs ... either due to space pressure

                   (using AUM) or bad luck (using rollback) in the read consistent view for the update

                   of row Y in table A at time 4 ... is overwritten (we wont examine why the overwrite

                   occurs at this point)

     Time 6: The query from session #1 arrives at row Y and and discovers the last updated time

                    (based on the SCN number) of the row to be later than Time 1 ... so the UNDO or

                    LOB segments are examined to find the read consistent view ... BUT ... the

                    transaction slot containing the view ... was overwritten at time 5 ... so no read

                    consistent view is available ... so an ORA-1555 occurs

NOTE ... UNDO is a generic term that can refer to either UNDO (AUM) or Rollback segments

简单说就是构造一致性读所需的UNDO块被覆盖了。

两个常见原因:

1、 回滚段信息被覆盖,一些版本过旧的block已经无法获取信息。

2、回滚段头的事务槽被覆盖

MOS中有详细的示例。

大概的覆盖过程:


ORA-1555报错

参考:

Explaining ORA-1555 Error (Doc ID 467872.1)

ORA-01555 "Snapshot too old" - Detailed Explanation (Doc ID 40689.1)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容