Troubleshooting ORA-1628 - max # extents (32765) reached for rollback segment <SEGMENT_NAME> (Doc ID 1580182.1)
Troubleshooting ORA-1628 - max # extents (32765) reached for rollback segment <SEGMENT_NAME> (Doc ID 1580182.1)
APPLIES TO:
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 Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
PURPOSE
Purpose of this document is to have a checklist for troubleshooting ORA-01628 errors i.e max # extents (32765) reached for rollback segment <SEGMENT_NAME> when using Automatic Undo Management (AUM).
本文档的目的是提供一个清单,以解决ORA-01628错误,即使用 Automatic Undo Management (AUM) 时 max # extents (32765) reached for rollback segment <SEGMENT_NAME>
This document also lists Known issues and bugs which may cause ORA-01628. 本文档还列出了可能导致ORA-01628的已知问题和错误
TROUBLESHOOTING STEPS
First: Check UNDO tablespace utilization and tuned undo retention : 第一:检查UNDO表空间利用率并调整undo retention
Aspect of the problem can be due to long running queries which can raise tuned_undoretention to very high values and exhausts the undo tablespace resulting in ORA-1628.
问题的一部分可能是由于长时间运行的查询可能将 tuned_undoretention 提升到非常高的值,并且耗尽了undo表空间,从而导致ORA-1628
So before diagnosing 1628 errors, it is important first to check UNDO tablespace utilization and tuned undo retention as follow :
因此,在诊断1628错误之前,重要的是首先要检查UNDO表空间利用率并调整undo retention,如下所示
SQL> SELECT DISTINCT STATUS,TABLESPACE_NAME, SUM(BYTES), COUNT(*) FROM DBA_UNDO_EXTENTS GROUP BY STATUS, TABLESPACE_NAME; SQL> select max(maxquerylen),max(tuned_undoretention) from v$undostat; SQL> select max(maxquerylen),max(tuned_undoretention) from DBA_HIST_UNDOSTAT; SQL> select sum(bytes) from dba_free_space where tablespace_name='&UNDOTBS';
Before proceed, Invistigate/Resolve any excessive allocation of ACTIVE/UNEXPIRED extents and high calculation of tuned_undoretention.
在继续之前,请 Invistigate/Resolve 任何对 ACTIVE/UNEXPIRED extents 的过度分配以及对 tuned_undoretention 的大量计算
Second: 1628 troubleshooting : 第二:1628故障排除
Basically, It is obvious to see high undo usage when there are huge transactions. 基本上,当有大量事务时,很明显会看到较高的 undo 使用率
Here is a query you can use to find out how much undo a transaction is using: 这是一个查询,您可以使用它查询事务正在使用多少undo操作
select a.sid, a.serial#, a.username, b.used_urec, b.used_ublk
from v$session a, v$transaction b
where a.saddr=b.ses_addr;
As you know, with automatic undo, you have no control over the extent sizes, nor do you have the ability to shrink them. This all happens automatically. The system automatically decides on the extent size, however it will generally start allocating larger extents if an undo segment is extending a lot. The large number of extents in the rollback segment is likely due to fragmentation in the undo tablespace: Oracle can probably only allocate extents of 64k due to fragmentation, so it is very probable to hit the max extents issue.
如您所知,使用自动undo,您无法控制扩展区大小,也无法缩小它们。这一切都是自动发生的。系统会自动决定扩展区的大小,但是如果undo段扩展了很多,通常它将开始分配更大的扩展区。回滚段中的大量扩展区可能是由于undo表空间中的碎片所致:由于碎片,Oracle可能只能分配64k的扩展区,因此很有可能遇到最大扩展区问题
The maximum number of extents for undo segments is limited to 32K and a long/large runing transaction can exhaust this limit by adding new extents if the next extent of the current one is not an expired one and finally will receive ORA-1628.
undo 段的最大扩展区数限制为32K,并且如果当前扩展区中的下一个扩展区不是过期的扩展区,则长/大型运行事务可以通过添加新扩展区来耗尽此限制,并且最终将收到ORA-1628
So, after getting the ORA-1628 errors in the transaction that extended the undo segment until its limit, future transactions will not be allowed to bind to the undo segment until it is not shrinked (you may see that the number of extents is decreased).
因此,在将undo段扩展到其限制之前的事务中出现ORA-1628错误之后,在不缩小undo段之前,将来的事务将不被绑定到undo段(您可能会看到扩展区的数量减少了)
So, The two major causes of ORA-1628 issue are a very large transaction or undo tablespace fragmentation.
因此,ORA-1628问题的两个主要原因是非常大的事务或undo表空间碎片
In case of large transaction, That is solved by splitting the large transaction to smaller ones (e.g. frequent commits).
对于大事务,可以通过将大事务拆分为较小的事务(例如频繁提交)来解决。
In case of undo tablespace fragmentation, That is solved by recreating the undo tablespace (this is also the recommended solution of Bug 10330444 and Bug 10229998 which were filed for the same issue and closed as not a bug).
如果是undo表空间碎片,可以通过重新创建undo表空间来解决(这也是建议的Bug 10330444和Bug 10229998的解决方案,它们是针对同一问题而提交的,并且已作为非bug关闭)。
To sum up: 总结一下
The ORA-1628 error is occurring in a transaction that is generating a lot of undo data, during an add extent operation in an undo segment and is indicating we have hit the MAXEXTENTS (32765) and then we cannot extend the undo segment.
ORA-1628 错误发生在一个事务中,该事务生成大量undo数据,在undo段的加范围操作期间,这表明我们已经达到了MAXEXTENTS(32765),然后我们无法扩展undo段
Suggested solutions 建议的解决方案
1) Set parameter "_rollback_segment_count" to online more available UNDO segments. Value should be set by placing the highest value obtained of the following queries:
1) 将参数 "_rollback_segment_count" 设置为在线更多可用的UNDO段。应通过放置以下查询获得的最大值来设置值
select status,count(*) from dba_rollback_segs group by status; --You add OFFLINE+ONLINE to get the number select max(maxconcurrency) from wrh$_undostat; select max(maxconcurrency) from v$undostat;
2) In case you have large value for TUNED_UNDORETENTION :
2) 如果 TUNED_UNDORETENTION 的值很高
SQL> select max(maxquerylen),max(tuned_undoretention) from v$undostat; SQL> select max(maxquerylen),max(tuned_undoretention) from DBA_HIST_UNDOSTAT;
A fix to Bug:7291739 is to set a new hidden parameter, _HIGHTHRESHOLD_UNDORETENTION to set a high threshold for undo retention completely distinct from maxquerylen:
Bug:7291739 的一个解决 方法 是设置一个新的隐藏参数 _HIGHTHRESHOLD_UNDORETENTION 来设置一个与 maxquerylen 完全不同的 undo retention 的高阈值:
ALTER SYSTEM SET "_highthreshold_undoretention"=max(maxquerylen)+1;
3) Before/after running large transactions, Shrink undo segments when reaching certain threshold (Ex: 15000 extents) do not wait to reach its maximum (32765) to be able to bring it below certain threshold so that this undo segment can qualify for binding again.
3) 在运行大型事务之前/之后,收缩undo段达到一定阈值(例如15000扩展区)时,不必等待达到最大值(32765)才能使其低于某个阈值,以便该undo段可以进行再次绑定
a) select a.inst_id, a.ksppinm "Parameter",
b.ksppstvl "Session Value",
c.ksppstvl "Instance Value"
from x$ksppi a, x$ksppcv b, x$ksppsv c
where a.indx = b.indx and a.indx = c.indx
and a.inst_id=b.inst_id and b.inst_id=c.inst_id
and a.ksppinm in ('_smu_debug_mode')
order by 2; select segment_name,
round(nvl(sum(act),0)/(1024*1024*1024),3 ) "ACT GB BYTES",
round(nvl(sum(unexp),0)/(1024*1024*1024),3) "UNEXP GB BYTES",
round(nvl(sum(exp),0)/(1024*1024*1024),3) "EXP GB BYTES",
NO_OF_EXTENTS
from ( select segment_name, nvl(sum(bytes),0) act,00 unexp, 00 exp, count(*) NO_OF_EXTENTS
from DBA_UNDO_EXTENTS
where status='ACTIVE' and tablespace_name = 'UNDOTBS1'
group by segment_name
union
select segment_name,00 act, nvl(sum(bytes),0) unexp, 00 exp , count(*) NO_OF_EXTENTS
from DBA_UNDO_EXTENTS
where status='UNEXPIRED' and tablespace_name = 'UNDOTBS1'
group by segment_name
union
select segment_name, 00 act, 00 unexp, nvl(sum(bytes),0) exp, count(*) NO_OF_EXTENTS
from DBA_UNDO_EXTENTS
where status='EXPIRED' and tablespace_name = 'UNDOTBS1'
group by segment_name
) group by segment_name, NO_OF_EXTENTS order by 5 desc; select sum(blocks),count(*) extents,segment_name from DBA_EXTENTS
where tablespace_name = 'UNDOTBS1' group by segment_name order by 2 desc; b) alter system set "_smu_debug_mode" = 4 scope=memory; c) alter rollback segment "_SYSSMU<n>$" shrink; d) alter system set "_smu_debug_mode" = <old_value_showed_at_step_a> scope=memory;
Then you can check the result of this measure by running the query in step a again before and after the above three steps.
然后,您可以通过在上述三个步骤之前和之后再次在步骤a中运行查询来检查此度量的结果
4) Drop and recreate undo tablespace (due to it's fragmentation)
4) 删除并重新创建undo表空间(由于其碎片)
The steps for recreating an undo tablespace are in Note 268870.1 Ext/Pub How to Shrink the datafile of Undo Tablespace.
Note 268870.1 Ext/Pub 如何缩小Undo Tablespac 的数据文件中提供了重新创建Undo Tablespac的步骤
5) Minimize the generated undo as much as possible :
5) 尽可能减少生成的undo
Example:
- split large transactions into smaller one 将大型事务拆分为较小的事务
- commit more often 更频繁地提交
- use direct path load rather than conventional path load to significantly reduce the amount of undo and thus also avoid a too high fragmentation of undo tablespace.
- 使用直接路径负载而不是常规路径负载来显着减少undo的数量,从而避免undo表空间的碎片过多。
Known issues/bugs
Bug 17306264 - ORA-1628: MAX # EXTENTS (32765) REACHED FOR ROLLBACK SEGMENT - OFTEN ENCOUNTERE
Bug 17306264 or the Patch 17306264 for 11g readme contains pre-requisite step to set the below event
event="64000 trace name context forever, level 25"
We recommend to set the event 64000 to level 25, as mentioned in the readme of the patch.
Bug 7291739 - Contention with auto-tuned undo retention or high TUNED_UNDORETENTION (Doc ID 7291739.8)
Bug 6499872 - ORA-01628: max # extents (32765) for rollback seg (Doc ID 6499872.8)
How To Check the Usage of Active Undo Segments in AUM (Doc ID 1337335.1)
Data Pump (or other Oracle process) Reports ORA-01628: Max # Extents (32765) For Rollback Segment _SYSSMUx$ (Doc ID 1434643.1)
ORA-1628 Max # Extents Reached Using AUM On Locally Managed Tablespace (Doc ID 761176.1)
Ora-01628: Max # Extents (32765) Reached For Rollback Segment. (Doc ID 837853.1)
ORA-1628: max # extents 32765 reached for rollback segment _SYSSMUxxx$ (Doc ID 432652.1)
Troubleshooting ORA-01555/ORA-01628/ORA-30036 during export and import (Doc ID 1579437.1)
将_rollback_segment_count设置为较高的值会创建许多undo段,无论是否需要。如果存在空间限制,并且在启动时要创建大量的undo段,则现有的undo段可能无法按预期增长。这可能会导致以较小的大小生成更多的扩展区,并最终生成ORA-1628。如果undo段中有足够的可用空间,则设置_rollback_segment_count可能不会产生此副作用。
REFERENCES
NOTE:1337335.1 - How To Check the Usage of Active Undo Segments in AUM
NOTE:1434643.1 - Data Pump (or other Oracle process) Reports ORA-01628: Max # Extents (32765) For Rollback Segment _SYSSMUx$
NOTE:7291739.8 - Bug 7291739 - Contention with auto-tuned undo retention or high TUNED_UNDORETENTION
NOTE:6499872.8 - Bug 6499872 - ORA-01628: max # extents (32765) for rollback seg
NOTE:761176.1 - ORA-1628 Max # Extents Reached Using AUM On Locally Managed Tablespace
BUG:10330444 - AUM ORA-01628 ERROR AFTER UPGRADED TO 11.2.0.2
BUG:10229998 - ORA-01628: MAX # EXTENTS REACHED FOR ROLLBACK SEGMENT _SYSSMU34_14488782
NOTE:432652.1 - ORA-1628: max # extents 32765 reached for rollback segment _SYSSMUxxx$
NOTE:1579437.1 - Troubleshooting ORA-01555/ORA-01628/ORA-30036 During Export and Import
BUG:7291739 - CONTENTION UNDER AUTO-TUNED UNDO RETENTION
BUG:17306264 - ORA-1628: MAX # EXTENTS REACHED FOR ROLLBACK SEGMENT - OFTEN ENCOUNTERE
NOTE:837853.1 - Ora-01628: Max # Extents (32765) Reached For Rollback Segment.
Troubleshooting ORA-1628 - max # extents (32765) reached for rollback segment <SEGMENT_NAME> (Doc ID 1580182.1)的更多相关文章
- ORACLE 8i 遇到报错:ORA-01631: max # extents (505) reached in table
近期在客户的一个8i生产库上使用statspack.发现alert中有报错: Mon Jun 16 13:17:52 2014 Errors in file /oracle/8.1.7/admin/p ...
- Troubleshooting ORA-01555/ORA-01628/ORA-30036 During Export and Import (Doc ID 1579437.1)
Troubleshooting ORA-01555/ORA-01628/ORA-30036 During Export and Import (Doc ID 1579437.1) APPLIES TO ...
- ProxySQL 排错 Max connect timeout reached while reaching hostgroup 10 after 10000ms
ProxySQL 排错 问题分析: 在ProxySQL在集群下,因未知原因导致误测到所有节点OFFLINE_HARD,并runtime_mysql_servers表清空,从而导致前端查询无法传递到后端 ...
- cron job error : c queue max run limit reached
在cron job的日志中发现以下报错: ! c queue max run limit reached Wed Aug 28 12:56:00 2013 ! rescheduling a cron ...
- Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1)
Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace (Doc ID 460481.1) APPLIES TO: Oracle Da ...
- Master Note: Troubleshooting ORA-1548 error (Doc ID 1577988.1)
APPLIES TO: Oracle Database Cloud Schema Service - Version N/A and laterOracle Database Exadata Clou ...
- Troubleshooting ORA-01555 - Snapshot Too Old: Rollback Segment Number "String" With Name "String" Too Small (Doc ID 1580790.1)
Troubleshooting ORA-01555 - Snapshot Too Old: Rollback Segment Number "String" With Name & ...
- 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) A ...
- Troubleshooting ORA-12547 TNS: Lost Contact (Doc ID 555565.1)
Troubleshooting ORA-12547 TNS: Lost Contact (Doc ID 555565.1) This error can occur in following scen ...
随机推荐
- 用两种以上的 方式实现一个方法或者对象,调用时打印"你好xx",已定义的代码不能做修改,自己编译的不能出现"你好"? (Javasctript)
先上代码 const obj = { say(){ Array.from(arguments).forEach(item=>{ console.log(`${this.str} ${item}` ...
- Cesium专栏-视频投影(附源码下载)
Cesium Cesium 是一款面向三维地球和地图的,世界级的JavaScript开源产品.它提供了基于JavaScript语言的开发包,方便用户快速搭建一款零插件的虚拟地球Web应用,并在性能,精 ...
- 用Docker运行Jenkins自动化构建.NET Core项目
目标 当代码提交到GitHub后,自动生成构建项目并部署到服务器.接下来介绍一下如何在容器中运行Jenkins,并自动化构建GitHub上的项目,使用自动化构建来解放你的双手. 前置条件 一台已经安装 ...
- RabbitMQ学习笔记(六、RabbitMQ进阶)
目录: 性能 存储机制 内存及磁盘告警 性能: 影响RabbitMQ性能的因素有很多,主要的分为硬件性能与软件性能. )硬件性能:如网络.内存.CPU等等. )软件性能:消息持久化.消息确认.路由算法 ...
- http返回头中content-length与Transfer-Encoding: chunked的问题释疑
先说说问题出现的背景: 公司服务器与手机客户端交互,客户端请求一个动态生成的XML文件,在用firebug查看http响应头的时候,有时候发现有content-length属性,有时候没 ...
- ACWING 844. 走迷宫
地址 https://www.acwing.com/problem/content/description/846/ 给定一个n*m的二维整数数组,用来表示一个迷宫,数组中只包含0或1,其中0表示可以 ...
- LG5003 跳舞的线 - 乱拐弯 线性DP
问题描述 LG5003 题解 设 \(mx[i][j][0/1]\)代表当前位置.朝向的最大拐弯数,最小同理. 来源为左边和上边. 坑点:起点可能为#. \(\mathrm{Code}\) #incl ...
- P4287 [SHOI2011]双倍回文
题意 考虑对每个节点\(x\)维护\(lastpos_x\)表示\(x\)的所有后缀回文串中第一个\(len\leqslant len_x/2\)并且能和\(x\)最后一个字符匹配的,之后枚举节点,判 ...
- 你知道Java要注意技术点吗?
关于Java的编程常识,有人会问哪几个是重要的常识点,不知道咱们是否知道呢?给咱们同享一下. 1.JVM相关(包含了各个版其他特性) 关于刚刚触摸Java的人来说,JVM相关的常识纷歧定需求了解很深, ...
- prerender-spa-plugin预渲染踩坑
为什么要使用预渲染? 为了应付SEO(国内特别是百度)考虑在网站(vue技术栈系列)做一些优化.大概有几种方案可以考虑: 服务端做优化: 第一,ssr,vue官方文档给出的服务器渲染方案,这是一套完整 ...