DATAGUARD(11.2.0.4) ORA-04021

简介: DATAGUARD(11.2.0.4) ORA-04021

1,问题现象

DG环境,凌晨时刻,实例DOWN,需要进行分析,观察DB Alert日志,可以明确看到ORA-04021报错,以及打印LGWR TRACE日志。

2,问题分析和处理建议
经查询由于Bug引发系统down,Bug信息:
Issue matches with bug 11712267 and bug 16717701
Since two bugs are matching with the case,
You can try with option (1) . As per Bug 11712267
change the cursor_sharing to force on Active dataguard (ADG).
Monitor your environment for sometime.
If it crashes again then follow with the option (2)
Option (2):
As per bug description
LGWR can request DBINSTANCE lock in X mode without any timeout which can lead to a hang / deadlock.
Both fixes are already included in 11.2.0.4 but the fix is DISABLED by default.
== > To ENABLE the fix one has to set == > "_adg_parselock_timeout" > to the number of centi-seconds == > LGWR should wait
before backing off and retrying the request.
Value should be in centi seconds. == > I Don't think there is really any hard fast rule for a value - at default (0) it will not timeout.
A value representing a few seconds seems reasonable - if LGWR has been stuck for say 5 seconds waiting it seems reasonable
guess it is not going to get the lock.
The param just causes it to abort the current attempt and retry If you want to play safe can start with a higher value then decrease later.
A higher value will just mean more sessions blocked for longer in case of the deadlock situation.
500 Seems reasonable , but I have no data to base it on.
There should be a statistic "ADG parselock X get attempts" If it gets set too small that value would likely
increase a lot due to keep timing out and retrying.
This is a dynamic parameter

Follow option (1) .
change the cursor_sharing to force on ADG
If issue re-appears then follow option (2) as below
Please set "_adg_parselock_timeout" to 500 == >
SQL > alter system set "_adg_parselock_timeout"=500 scope=both sid='*';
处理建议:
第一修改 cursor_sharing 参数为Force,目的是什么,是为了让硬解析的SQL大部分转为软解析,降低shared pool内存资源,以及内存栓锁及CPU的争用。
第二修改_adg_parselock_timeout 为500,及LGWR获取内存栓锁默认是0,不允许延迟,设置为5s,允许性能极差或资源争用的情况下,延长LGWR的申请时间。

相关文章
|
Oracle 关系型数据库 数据库
实战篇:Oracle 数据坏块的 N 种修复方式
实战篇:Oracle 数据坏块的 N 种修复方式
实战篇:Oracle 数据坏块的 N 种修复方式
|
存储 关系型数据库 MySQL
RDS MySQL 数据库运维简述
从运维的视角,汇总云数据库RDS MySQL使用的避坑指南。文章初版,维护更新,欢迎指点。
1252 3
|
SQL 监控 Oracle
Oracle 数据库报错:ORA-12592问题排查过程
Oracle 数据库报错:ORA-12592问题排查过程
4496 0
|
8月前
|
存储 关系型数据库 分布式数据库
PolarDB开源数据库进阶课16 接入PostGIS全功能及应用举例
本文介绍了如何在PolarDB数据库中接入PostGIS插件全功能,实现地理空间数据处理。此外,文章还提供了使用PostGIS生成泰森多边形(Voronoi diagram)的具体示例,帮助用户理解其应用场景及操作方法。
363 1
|
运维 关系型数据库 MySQL
在Linux中,如何使用strace进行故障排查?
在Linux中,如何使用strace进行故障排查?
|
Linux
详细解读CPUAffinity(CPU亲合力)
详细解读CPUAffinity(CPU亲合力)
304 0
|
运维 Linux Anolis
移动云工程师:bclinux-sysmt 跨版本升级 OS 流程解析及实践经验分享 | 第 56 期
本周三下午3点,将在线介绍 bclinux-sysmt 的工作流程和实践经验。
移动云工程师:bclinux-sysmt 跨版本升级 OS 流程解析及实践经验分享 | 第 56 期
|
SQL 存储 Oracle
Oracle-临时表空间(组)解读
Oracle-临时表空间(组)解读
652 0
|
存储 并行计算 关系型数据库
使用 PolarDB 开源版 部署 PostGIS 支撑时空轨迹|地理信息|路由等业务
背景PolarDB 的云原生存算分离架构,,具备低廉的数据存储、高效扩展弹性、高速多机并行计算能力、高速数据搜索和处理;;PolarDB与计算算法结合,,将实现双剑合璧,推动业务数据的价值产出,将数据变成生产力。本文将介绍使用 PolarDB 开源版 部署 PostGIS 支撑时空轨迹|地理信息|路...
318 0