ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)
ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.4 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
Symptoms:
- A job or process is consistently giving ORA-1555 errors.
- job or process持续出现ORA-1555错误
- Increasing the undo_retention value has not stopped the errors.
- 增加undo_retention值并未停止错误
- The ORA-1555 occurs even if there are no other jobs/processes updating the objects reported in the failed SQL.
- 即使没有其他 jobs/processes 更新失败SQL中报告的对象,也会发生ORA-1555
- The datafiles for the undo tablespace have autoextend turned on, and the file size is less than MAXBYTES.
- undo tablespace的数据文件已启用自动扩展,并且文件大小小于MAXBYTES
- A look at the v$undostat shows that the query length is less than both the undo_retention and the tuned_undoretention
- 查看 v$undostat 显示查询长度小于undo_retention和tuned_undoretention两者
To find the max query length and the tuned_undo retention, run this SQL.
--要查找最大查询长度和tuned_undo retention,请运行此SQL set pagesize 25
set linesize 100
column UNXPSTEALCNT heading "# Unexpired|Stolen"
column EXPSTEALCNT heading "# Expired|Reused"
column SSOLDERRCNT heading "ORA-1555|Error"
column NOSPACEERRCNT heading "Out-Of-space|Error"
column MAXQUERYLEN heading "Max Query|Length"
select inst_id, to_char(begin_time,'MM/DD/YYYY HH24:MI') begin_time,
UNXPSTEALCNT, EXPSTEALCNT , SSOLDERRCNT, NOSPACEERRCNT, MAXQUERYLEN, TUNED_UNDORETENTION
from gv$undostat
order by inst_id, begin_time; Then look for the timestamp at which the ORA-1555 occurred.
--然后查找发生ORA-1555的时间戳
The max query length will be less than undo_retention, and less than tuned_undoretention.
--max query length 将小于 undo_retention,并且小于tuned_undoretention
Note: When tuned_undoretention is used, the undo_retention becomes a minimum setting.
--注意:使用tuned_undoretention时,undo_retention成为最小设置。
Here is an example of the output of the above SQL 这是上述SQL输出的示例
Unexpired Expired ORA-1555 Out-Of-space Max Query
INST_ID BEGIN_TIME Stolen Reused Error Error Length TUNED_UNDORETENTION
------- ---------------- ---- ------ ----- ------------ ---------- ------------
1 06/14/2010 20:51 0 0 0 0 719 2000
1 06/14/2010 21:01 0 0 1 0 1323 2225 <--ORA-1555 here
1 06/14/2010 21:11 0 0 0 0 699 2000
1 06/14/2010 21:21 0 0 0 0 1303 2205
1 06/14/2010 21:31 0 0 0 0 678 2000
We can see that there were no stolen unexpired extents, and the length of the query was 1323 seconds, while the tuned_undoretention was 2225 seconds.
我们可以看到没有未到期的扩展数据段,查询的长度为1323秒,而tuned_undoretention为2225秒。
There were also no out-of-space errors. 也没有空间不足的错误
CAUSE
The issue can be caused by two reasons: 该问题可能是由于两个原因引起的
1. Indexes/table mismatch 索引/表不匹配
OR
2. Similar issue is reported as Bug 8231583 Abstract: ORA-1555 WHEN QUERY LENGTH < TUNED RETENTION
2. 相似的问题报告为 Bug 8231583 Abstract: ORA-1555 WHEN QUERY LENGTH < TUNED RETENTION
The bug has been closed at this point without finding a root issue. The problem is not easy to reproduce consistently.
该错误目前已关闭,没有找到根本问题。问题不容易一致地重现。
SOLUTION
1. If the 1555 error is consistently reported against a certain table each time, so this most like is caused by Indexes/table mismatch and you need to drop/recreate (not rebuild) all table indexes.
1. 如果每次都针对某个表始终报告1555错误,那么这很像是由 Indexes/table 不匹配引起的,您需要 drop/recreate (not rebuild) 所有表索引
Similar issue described in Note: 977902.1.
2. Bug 8231583 reported on this issue is closed due to the lack of reproducibility.
2. 由于缺乏可重复性,因此已报告关于此问题的错误8231583
There are a few workarounds identified for this issue. One option is to create a new undo tablespace and switch to the new Undo tablespace.
有一些解决此问题的方法。一种选择是创建一个新的undo tablespace并切换到新的Undo tablespace
CREATE UNDO TABLESPACE undotbs_02
DATAFILE '/u01/oracle/rbdb1/undo0201.dbf' SIZE 2M REUSE AUTOEXTEND ON; ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02;
The old undo can only be dropped after all transactions have cleared from the undo tablespace.
只有在undo tablespace中清除了所有事务之后,才能删除旧的undo
Please refer to the Oracle Database Administrator's manual for creating a new undo, switching to a new undo tablespace, and dropping the undo tablespace.
Oracle Database Administrator's Guide
10g Release 2 (10.2)
Chapter 10 Managing the Undo Tablespace
Oracle Database Administrator's Guide
11g Release 2 (11.2)
Chapter 15 Managing Undo
Section: Managing Undo Tablespaces
As a second option, disable auto tuning by setting 第二种选择是通过设置disable auto tuning
"_undo_autotune" = false
after creating a new undo tablespace has avoided future occurrences of the problem condition at some database locations.
创建新的undo tablespace后,避免了将来在某些数据库位置出现问题情况。
Until a consistent, reproducible test case can be developed in-house this problem remains unresolved.
在内部开发出一致,可重复的测试用例之前,这个问题仍然没有解决。
3. Afterwords, If this is still consistently reproducible in your database then to progress this with development, check Note: 761128.1 to get diagnostic information needs to be collected at the time the ORA-01555 error occurs to be able to engage development.
3. 后记,如果仍然可以在您的数据库中始终复制此代码,则要继续进行开发,请检查注:761128.1以获取诊断信息,以便在发生ORA-01555错误时能够进行开发。
REFERENCES
NOTE:461480.1 - FAQ – Automatic Undo Management (AUM) / System Managed Undo (SMU)
NOTE:877613.1 - AUM Common Analysis/Diagnostic Scripts
BUG:18602141 - ORA-1555 QUERY FAILING BEFORE UNDO_RETENTION IS REACHED
BUG:19014280 - ACTIVE DG: LGWR BLOCKS SEVERAL SESSIONS DURING GLOBAL FLUSH
BUG:18899974 - ORA-600 [KCBGTCR_13] ON ACTIVE DATAGUARD
BUG:8231583 - ORA-01555 WHEN QUERY LENGTH < TUNED RETENTION
BUG:8231583 - ORA-01555 WHEN QUERY LENGTH < TUNED RETENTION
NOTE:240746.1 - 10g NEW FEATURE on AUTOMATIC UNDO RETENTION
ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)的更多相关文章
- Using innodb_large_prefix to avoid ERROR #1071,Specified key was too long; max key length is 1000 bytes
Using innodb_large_prefix to avoid ERROR 1071 单列索引限制上面有提到单列索引限制767,起因是256×3-1.这个3是字符最大占用空间(ut ...
- ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
今天在MySQL 5.6版本的数据库中修改InnoDB表字段长度时遇到了"ERROR 1071 (42000): Specified key was too long; max key le ...
- hive异常:创建MySQL时Specified key was too long; max key length is 1000 bytes
2015-11-13 14:44:44,681 ERROR [main]: DataNucleus.Datastore (Log4JLogger.java:error(115)) - An excep ...
- 索引长度过长 ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
1.发现问题 今天在修改innodb表的某个列的长度时,报如下错误: alter table test2 modify column id varchar(500); ERROR 1071 (4200 ...
- Hive集成Mysql作为元数据时,提示错误:Specified key was too long; max key length is 767 bytes
在进行Hive集成Mysql作为元数据过程中.做全然部安装配置工作后.进入到hive模式,运行show databases.运行正常,接着运行show tables:时却报错. 关键错误信息例如以下: ...
- OpenStack安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max key length is 767 bytes‘) [SQL: u‘\nCREATE TABLE migrate_ver
折腾了两天的错误,BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max key length is ...
- MySQL 报错:[Err] 1071 - Specified key was too long; max key length is 767 bytes
[Err] 1071 - Specified key was too long; max key length is 767 bytes 这个会出现在MySQ5.7以下版本 因为没有启用innodb_ ...
- 数据库操作提示:Specified key was too long; max key length is 767 bytes
操作重现: 法1:新建连接——>新建数据库——>右键数据库导入脚本——>提示:Specified key was too long; max key length is 767 by ...
- Mysql Specified key was too long; max key length is 767 bytes
今天导入一个数据库时,看到以下报错信息: Specified key was too bytes 直译就是索引键太长,最大为767字节. 查看sql库表文件,发现有一列定义如下: 列 名:cont ...
随机推荐
- 利用Azure虚拟机安装Dynamics 365 Customer Engagement之二:创建域控虚拟机
我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面 ...
- JAVA微信企业付款到零钱(十分钟搞定),附完整DEMO下载
最近帮朋友做了一个简单的微分销系统,实现从企业付款到零钱分润的功能,简单记录一下微信企业付款到零钱的开发过程, 主要就是按规则封装好请求参数调用微信接口,涉及一些签名校验: A.接口流程 1. 获取用 ...
- QT--HTTP图片下载器
QT--HTTP图片下载器 1.http使用前提 QT += core gui network //必须加上network 2.必须头文件 #include <QNetwork ...
- MySQL数据篇(八)-- 存储过程的简单实现
思考:一般我们的数据都是存储在数据库里面,对于常规的CRUD操作都是用代码实现,比如使用PHP做项目,所有的数据处理都需要主动操作代码实现.如果我们现在有一项目,业务需要在用户下单后,对用户的订单进行 ...
- FreeRTOS操作系统,在按键中断函数中恢复被挂起的任务,程序卡死的原因和解决办法
出现问题场景: 作为刚接触FreeRTOS实时操作系统的菜鸟,我在练习一个程序功能:按键3按下,将LED闪烁的任务挂起:按键4按下,将LED闪烁的任务恢复到就绪.按键使用外部中断.恢复就绪 ...
- WPf 带滚动条WrapPanel 自动换行 和控件右键菜单
原文:WPf 带滚动条WrapPanel 自动换行 和控件右键菜单 技能点包括 WPf 样式的引用 数据的验证和绑定 比较适合初学者 前台: <Window.Resources> < ...
- 趣谈Linux操作系统学习笔记:第二十讲
一.引子 1.计算两方面的原因 2.内存管理机制 二.独享内存空间的原理 1.会议室和物理内存的关系 和会议室一样,内存都被分成一块块儿的,都编号了号,例如3F-10就是三楼十号会议室.内存页有这样一 ...
- linux五天光速入门
第一章: 01 Linux的安装及相关配置 → B站视频链接(p1-p21) 02 UNIX和Linux操作系统概述 → B站视频链接 第二章: 01 Linux命令及获取帮助 → B站视 ...
- PHP实现Redis分布式锁
锁在我们的日常开发可谓用得比较多.通常用来解决资源并发的问题.特别是多机集群情况下,资源争抢的问题.但是,很多新手在锁的处理上常常会犯一些问题.今天我们来深入理解锁. 一.Redis 锁错误使用之一 ...
- PHP 构造函数
在PHP5以前的版本中,构造函数的名称必须与类名相同,这种方法在PHP5中仍然可以使用,但现在已经很少有人用了.PHP5以及之后的版本,构造函数用__construct()方法来声明,这样做的好处是可 ...