`

ORA-01555

阅读更多

A common error to receive when issuing long-running transactions is `ORA-1555,
`Snapshot too old'.  In the Oracle Server messages manual for this error, the
cause given is `Rollback Segment too small.'  That is misleading, as it is
possible to get this error message with any size rollback segment and
increasing the size of rollback segments may not necessarily help.

When a transaction is started, Oracle keeps track of the time (actually the
SCN) that it was first issued.  While gathering row information to fulfill the
statement, Oracle checks each row to make sure that none of the rows was
modified after the begin date of the current transaction.  If a row is located
which was modified, Oracle goes out to the rollback segment for the value of
that row which existed when the current transaction started.  For uncommitted
changes, the information will always exist in the rollback segment, and there
are no snapshot issues.  However, if there is a change that was committed after
the current transaction started, then the rollback space where that transaction
information is stored may get overwritten by subsequent transactions (or
eliminated entirely by an OPTIMAL shrink).  If Oracle tries to get information
for that row and the rollback transaction no longer exists, a read-consistent
result set cannot be returned and an ORA-1555 error is generated.

No matter what size rollback segment(s) exists on the database, it is possible
for committed transactions to be overwritten.  The larger (and more) rollback
segments that exist in the system, the less often transactions will be
overwritten.  This is the basis for the Server Messages error explanation of
`rollback segment too small'.

Note:  A common (and incorrect) assumption is that the ORA-1555 message
indicates that the rollback segment being used by the current transaction is
too small.  Most commonly it is SELECT statements which generate ORA-1555
errors.  SELECT statements do not generate rollback information.  Rollback
information is generated for a `CREATE TABLE AS SELECT' statement, but it is
the CREATE, rather than the SELECT which does so.

The best way to handle ORA-1555 errors is simply to start the long-running
transaction when there are few (or no) other transactions running against the
database.  So long as there are updates occurring to the table(s) being
accessed, snapshot errors are possible.  If possible, it also helps to split
the transaction into smaller pieces that take less time to run. However, if
neither of these is possible, there are a couple of items to keep in mind when
trying to resolve ORA-1555 errors by modifying rollback configurations:

Make sure all rollback segments are online.  The more segments are online, the
more transactions are spread out and the less often any individual transaction
will be overwritten.  Exceptions to this include cases where there is a massive
rollback segment that is reserved for other uses and tiny rollback segments
that `wrap' head to tail often.  Having such tiny segments online can actually
make a 1555 worse.

Make all rollback segments that are online (except SYSTEM) approximately the
same size.  Transactions are assigned rollback segments in a round-robin
fashion (not exactly, but close enough).  Since a transaction which can cause
an ORA-1555 can appear in any segment (other than SYSTEM), the likelihood of
receiving and ORA-1555 will almost always be dictated by how fast the smallest
rollback segment wraps (and rewrites old transactions)

分享到:
评论

相关推荐

    记录一次EXPDP导出BLOB字段 遇到ORA-01555报错

    oracle expdp导出blob字段遇到ora-01555报错的解决方案

    ORA-01555错误浅析

    ORA-01555错误浅析,分析的很好

    [Oracle] 浅析令人抓狂的ORA-01555问题

    因此,在数据库的日常维护工作中,如果只是一次两次碰到ORA-01555错误,一般都先忽略,但是如果经常碰到该错误,则要进行一些调整以避免该错误的再次发生。 1. 为什么会产生ORA-01555错误?这个错误是由数据库的读...

    ORA错误分析及解决

    资料整理,包括: 一些ORACLE问题如ORA-01555,ORA-07445的分析和解决, 以及FAST_START_MTTR_TARGET相关的4个参数设置

    Oracle11g体系结构深入剖析和运维管理(五)

    资源名称:Oracle 11g体系结构深入剖析和运维管理(五)资源目录:【】37_深入剖析事务槽及Oracle多种提交方式【】38_OracleIMU及RedoPrivateStrands技术【】39_读一致性(ORA-01555错误机制分析)及Undo表空间大小设置...

    oracle补丁

    解决通过数据泵将10g库迁移到11g库时报错ORA-39126、ORA-01555

    Oracle面试题 oracle学习题

    截取部分题目如下,有答案: 1. 解释冷备份和热备份的不同点以及各自的优点 2. 你必须利用备份恢复数据库,但是你没有控制文件,该如何解决问题呢? 3. 如何转换init.ora到spfile?...19. ORA-01555的应对方法?

    ora 01555 snapshot too old

    ora 01555 snapshot too old 延迟块清除

    记一次Oracle数据恢复过程

    开始尝试用flashback query恢复数据,报ORA-01555错误,此路不通。维护人员说,星期五之前的RMAN备份已经被删除了(又是一个备份恢复策略不当地例子),使用基于时间点的恢复也不可能了。剩下的一条路,只有使用log ...

    深入解析OracleDBA入门进阶与诊断案例 4/4

     8.13 ORA-01555成因与解决   8.14 Oracle 11g闪回数据归档   8.15 AUM下如何重建UNDO表空间   8.16 使用Flashback Query恢复误删除数据   8.17 诊断案例之一:释放过度扩展的UNDO空间   8.18 特殊...

    深入解析OracleDBA入门进阶与诊断案例 3/4

     8.13 ORA-01555成因与解决   8.14 Oracle 11g闪回数据归档   8.15 AUM下如何重建UNDO表空间   8.16 使用Flashback Query恢复误删除数据   8.17 诊断案例之一:释放过度扩展的UNDO空间   8.18 特殊...

    深入解析OracleDBA入门进阶与诊断案例 2/4

     8.13 ORA-01555成因与解决   8.14 Oracle 11g闪回数据归档   8.15 AUM下如何重建UNDO表空间   8.16 使用Flashback Query恢复误删除数据   8.17 诊断案例之一:释放过度扩展的UNDO空间   8.18 特殊...

    Oracle 9i&10g编程艺术:深入数据库体系结构(全本)含脚本

    9.6.2 ORA-01555: snapshot too old错误 323 9.7 小结 334 第10章 数据库表 335 10.1 表类型 335 10.2 术语 337 10.2.1 段 337 10.2.2 段空间管理 339 10.2.3 高水位线 340 10.2.4 freelists 342 10.2.5 ...

    深入解析Oracle.DBA入门进阶与诊断案例

    8.13 ORA-01555成因与解决 382 8.14 Oracle 11g闪回数据归档 389 8.15 AUM下如何重建UNDO表空间 393 8.16 使用Flashback Query恢复误删除数据 394 8.17 诊断案例之一:释放过度扩展的UNDO空间 396 8.18 ...

    记录一次隐含参数也不好解决的备份恢复.pdf

    ‐‐ 报错: 5 ORA‐01194: file 1 needs ...13 ORA‐01555: snapshot too old: rollback segment number 7 with name 14 "_SYSSMU7_4222772309$" too small 15 Process ID: 1730 16 Session ID: 1996 Serial number: 3

    Oracle编程艺术

    3.1.2 遗留的init.ora 参数文件........................................................150 3.1.3 服务器参数文件..................................................................152 3.1.4 参数文件小结......

Global site tag (gtag.js) - Google Analytics