Snapshot too old error

送分小仙女□ 提交于 2019-12-08 06:28:09

问题


I am getting 'snapshot too old error' frequently while i am running my workflow when it runs for more than 5 hrs.My source is oracle and target is Teradata. Please help to solve this issue.Thanks in advance


回答1:


The best explanation of the ORA-01555 snapshot too old error that I've read, is found in this AskTom thread

Regards.




回答2:


The snapshot too old error is more or less directly related to the running time of your queries (often a cursor of a FOR loop). So the best solution is to optimize your queries so they run faster.

As a short term solution you can try to increase the size of the UNDO log.

Update:

The UNDO log stores the previous version of a record before it's updated. It is used to rollback transactions and to retrieve older version of a record for consistent data snapshots for long running queries.

You'll probably need to dive into Oracle DB administration if you want to solve it via increasing the UNDO log. Basically you do (as SYSDBA):

 ALTER SYSTEM SET UNDO_RETENTION = 21600;

21600 is 6 hours in seconds.

However, Oracle will only keep 6 hours of old data if the UNDO log files are big enough, which depends on the size of the rollback segments and the amount of updates executed on the database.

So in addition to changing the undo retention time, you should also make sure that few concurrent updates are executed while your job is running. In particular, updates of the data your job is reading should be minimized.

If everything fails, increase the UNDO logs.



来源:https://stackoverflow.com/questions/11972979/snapshot-too-old-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!