How to Determine the Value Of UNDO_RETENTION Parameter to Avoid ORA-1555 (Doc ID 822411.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 21-Jul-2017***

SYMPTOMS

The objective of this note  is to explain how to set UNDO_RETENTION parameter and to clarify how the error ORA-1555 could be generated due to wrong setting of UNDO_RETENTION parameter value.

本文的目的是解释如何设置UNDO_RETENTION参数,并阐明由于错误设置UNDO_RETENTION参数值而导致如何生成错误ORA-1555

CAUSE

undo_retention sizing  undo_retention大小调整

SOLUTION

You need to tune to increase to an optimum value the UNDO_RETENTION parameter.  您需要调整以将UNDO_RETENTION参数增加到最佳值
The value for this parameter is specified in seconds.  以秒为单位指定此参数的值
This is important for systems running long queries.  这对于运行长查询的系统很重要

That could be tuned by checking the maxquerylen from v$undostat;  可以通过检查 v$undostat 中的 maxquerylen 来调整

The UNDO_RETENTION value should at least be equal to the length of longest running query on a given database instance.

UNDO_RETENTION 值应至少等于给定数据库实例上运行时间最长的查询的长度。

This can be determined by querying V$UNDOSTAT view once the database has been running for a while.

数据库运行一段时间后,可以通过查询 V$UNDOSTAT 视图来确定

SQL> select max(maxquerylen) from v$undostat;

This needs to be captured when the system has been running for a while and is fully used.

当系统运行了一段时间并且已完全使用时,需要捕获此信息

The following two column are enough to check if you are detecting or not an out of space error and/or ora-1555 one :

以下两列足以检查您是否正在检测到空间不足 error and/or ora-1555

SSOLDERRCNT - The number of ORA-1555 errors that occurred during the interval  间隔期间发生的ORA-1555错误的数量
NOSPACEERRCNT - The number of Out-of-Space errors  空间不足错误数

The folowing Note 262066.1: How To Size UNDO Tablespace For Automatic Undo Management
explains how to set undo tablespace correctly to guarantee undo retention.  介绍了如何正确设置undo表空间以确保undo retention。

When this option is enabled the database never overwrites unexpired undo data that is, undo data whose age is less than the undo retention period.
启用此选项后,数据库将永远不会覆盖未过期的undo数据,即年龄小于undo保留期的undo数据。

The storage and used space for undo is then a direct consecuency on your undo_retention configuration.

这样,undo的存储空间和使用的空间就直接决定了undo_retention配置的安全性。

The recommend value for undo_retention is the value is length of longest running query on a given database instance.
undo_retention 的推荐值是该值是给定数据库实例上运行时间最长的查询的长度。

If you see a message in the trace file like "Query Duration=5095 " means that the Query was running for '5095 sec' when the error occured.

如果在跟踪文件中看到一条消息,例如 "Query Duration=5095 " ,则表示发生错误时查询正在运行  '5095 sec' 。

Note that the UNDO_RETENTION parameter works best if the current undo tablespace has enough space for the active transactions.

请注意,如果当前的undo表空间具有足够的空间用于活动事务,则UNDO_RETENTION参数最有效。

If an active transaction needs undo space and the undo tablespace does not have any free space, then the system will start reusing undo space that would have been retained.
如果活动事务需要undo空间,并且undo表空间没有任何可用空间,则系统将开始重新使用原本保留的undo空间。
This may cause long queries to fail.  这可能会导致长查询失败。
Be sure to allocate enough space in the undo tablespace to satisfy the space requirement for the current setting of this parameter.

确保在undo表空间中分配足够的空间,以满足该参数当前设置的空间要求。

REFERENCES

NOTE:262066.1 - How To Size UNDO Tablespace For Automatic Undo Management
NOTE:269814.1 - ORA-01555 Using Automatic Undo Management - Causes and Solutions

如何确定UNDO_RETENTION参数的值以避免ORA-1555 (Doc ID 822411.1)的更多相关文章

  1. SubSonic3.0使用存储过程查询时,不能使用output参数返回值的问题修改

    有个群友问SubSonic3.0执行存储过程时能不能使用output参数返回值,说测试过后获取不到返回值,早上有些时间所以就尝试修改了一下 首先在数据库中创建一个存储过程 CREATE PROCEDU ...

  2. 使用JS,获取URL中指定参数的值

    /** * 获取URL中指定参数的值 * * @param name 参数名称 * @returns */ function getQueryString(name) { var reg = new ...

  3. Python函数参数默认值的陷阱和原理深究"

    本文将介绍使用mutable对象作为Python函数参数默认值潜在的危害,以及其实现原理和设计目的 本博客已经迁移至: http://cenalulu.github.io/ 本篇博文已经迁移,阅读全文 ...

  4. java函数参数默认值

    java函数参数默认值 今天,需要设定java函数参数的默认值,发现按照其它语言中的方法行不通 java中似乎只能通过函数的重载来实现 函数参数默认代码

  5. 获取URL的code的参数的值

    1.获取URL的code的参数的值 需求说明:现在有URL为http://www.bdqn.cn/index.php?code=sdR4,请使用字符串对象的属性和方法来获取code的值,并把其指都转化 ...

  6. asp.net mvc 在View中获取Url参数的值

    如果url是 /home/index?id=3 直接Request就ok. 但是如果路由设定为:{controller}/{action}/{id} url是 /home/index/3   这时想在 ...

  7. JVM参数(三)打印所有XX参数及值

    本篇文章基于Java 6(update 21oder 21之后)版本, HotSpot JVM 提供给了两个新的参数,在JVM启动后,在命令行中可以输出所有XX参数和值. -XX:+PrintFlag ...

  8. java解析出url请求的路径和参数键值对类 - 转

    import java.util.HashMap; import java.util.Map; public class CRequest { /** * 解析出url请求的路径,包括页面 * @pa ...

  9. 使用JavaScript获取Request中参数的值

    本人很少写博客,有不正确的地方还希望大家多多指导. 假设现在有一个URL,如下. http://www.jacky.com/?id=1101&name=jacky 如何通过JS访问到id和na ...

随机推荐

  1. Redisson基本用法

    1.  Redisson Redisson是Redis官方推荐的Java版的Redis客户端.它提供的功能非常多,也非常强大,此处我们只用它的分布式锁功能. https://github.com/re ...

  2. code snippet:依赖属性propa的小技巧

    很早之前就玩过VS里面的code snippet,相当方便. 今天在用prop自动属性代码时,无意中用了一下propa,然后就自动出来了依赖属性的代码片段,太方便了,尤其是对于WPF新手来说,比如我这 ...

  3. 线程提供的方法:static void sleep(long ms),会进入阻塞状态,休眠

    package seday08.thread; import java.util.Scanner; /*** @author xingsir * 线程提供的方法:static void sleep(l ...

  4. SAP_ECC6_EHP7_IDES安装文档ORACLE11G+WINDOWS2012 R2 问题总结

    SAP_ECC6_EHP7_IDES安装文档ORACLE11G+WINDOWS2012 R2 问题总结 1.注意密码不能带@等特殊符号,否则会报如下错误,因为ORACLE数据是不容许密码带@的.@是一 ...

  5. SpringBoot项目下的JUnit测试

    在SpringBoot项目里,要编写单元测试用例,需要依赖4个jar.一个是最基本的JUnit,然后是spring-test和spring-boot-test. <!--test--> & ...

  6. 团队项目之Scrum4

    小组:BLACK PANDA 时间:2019.11.24 每天举行站立式会议 提供当天站立式会议照片一张 2 昨天已完成的工作 2 基本实现web富文本编辑功能 后台的编辑接口已经基本完成,还有一些b ...

  7. 运维工程师必会工具(Nmap和TCPdump)

    1.NMap工具 主要功能:探测主机是否在线.扫描主机开放端口和嗅探网络服务,用于网络探测和安全扫描. NMap支持很多扫描技术,例如:UDP.TCPconnect().TCPSYN(半开扫描).ft ...

  8. MAC 下将libpomelo连接到cocos2d-x

    摘要:借助GYP将libpomelo连接到Cocos2d-x项目并使项目能与服务端成功连接. 配置:OS X 10.9.4 + Xcode 6.0 + Cocos2d-x-3.2 一.部署GYP(Ge ...

  9. pytest系列(二):筛选用例新姿势,mark 一下,你就知道。

    pytest系列(一)中给大家介绍了pytest的特性,以及它的编写用例的简单至极. 那么在实际工作当中呢,我们要写的自动化用例会比较多,不会都放在一个py文件里. 如下图所示,我们编写的用例存放在不 ...

  10. 10. Go 语言反射

    Go 语言反射 反射是指在程序运行期对程序本身进行访问和修改的能力.程序在编译时,变量被转换为内存地址,变量名不会被编译器写入到可执行部分.在运行程序时,程序无法获取自身的信息. 支持反射的语言可以在 ...