oracle 快照太旧错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11972979/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:03:00  来源:igfitidea点击:

Snapshot too old error

oracleteradatainformatica

提问by user1601052

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

当我运行工作流程超过 5 小时时,我经常收到“快照太旧错误”。我的源是 oracle,目标是 Teradata。请帮助解决这个问题。提前致谢

回答by Codo

The snapshot too olderror 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.

快照太旧错误或多或少直接关系到你的查询的运行时间(通常的游标FOR循环)。因此,最好的解决方案是优化您的查询,使其运行得更快。

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

作为短期解决方案,您可以尝试增加 UNDO 日志的大小。

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.

UNDO 日志在更新之前存储记录的先前版本。它用于回滚事务并检索旧版本的记录,以便为长时间运行的查询提供一致的数据快照。

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):

如果您想通过增加 UNDO 日志来解决它,您可能需要深入研究 Oracle DB 管理。基本上你这样做(作为 SYSDBA):

 ALTER SYSTEM SET UNDO_RETENTION = 21600;

21600 is 6 hours in seconds.

21600 是以秒为单位的 6 小时。

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.

但是,如果 UNDO 日志文件足够大,Oracle 只会保留 6 小时的旧数据,这取决于回滚段的大小和对数据库执行的更新量。

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.

如果一切都失败了,请增加 UNDO 日志。

回答by Rob van Wijk

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

我读过的 ORA-01555 快照太旧错误的最佳解释可以在此 AskTom 线程中找到

Regards.

问候。