ERROR:ORA-01555

tsinglee發表於2008-04-02

The usual cause of this error is that long-running transactions/queries are
occurring within the database at the same time as short online transactions.
When the short transactions complete, the rollback segments they have used is up
for grabs and can be overwritten. As soon as that area is overwritten, the long-
running queries/transactions can no longer maintain a read consistent picture of
the data, and they fail with an ORA-1555. It's a scheduling problem. Run batch
and long-running jobs at off-hours.

Example Scenario:
1.A long running Query (T1) is started.
2.A quick update (T2) is performed and committed on a table that T1 won't
require for another 20 minutes. When T2 is committed it's rollback segment
blocks and extents are kept but marked as inactive.
3.Another DML statement is issued (T3). Oracle assigns a rollback segment to T3
using a round robin algorithm. The assigned segment includes the same storage as
the one previously used by T2. Thus it overwrites the inactive before-image of
T2.
4.T1 now comes to the point in the query where it needs the before-image of the
data that was changed by T2.
5.But T1 must read the before-image of the changed data records (for read
consistency).
6.T1 attempts to read the before-image left from T2 -- only to find that it has
been overwritten by T3.
7.T1 can no longer access the before-image of T2. T1 abends at this point.
8.ORACLE then issues: ORA-1555: snapshot too old (rollback segment too small).

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-1001790/,如需轉載,請註明出處,否則將追究法律責任。

相關文章