Oracle 9i 升级中的bug-- Sys.Cdc_alter_ctable_before ORA-04020 deadlock detected while trying to lock obj

本文主要是介绍Oracle 9i 升级中的bug-- Sys.Cdc_alter_ctable_before ORA-04020 deadlock detected while trying to lock obj,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 

在将数据库从9.2.0.6 升级到 9.2.0.8 的过程中,执行utlrp.sql 脚本时,遇到了Oracle 的一个bug Oracle 的说法是:

 

Oracle Server - Enterprise Edition - Version: 9.2.0.8 and later   [Release: 9.2 and later ]
Information in this document applies to any platform. This is cause by internal bug 3017048 fixed in 10.1.0.2.

 

Oracle 9.2以后的版本都有这个bug,直到10.1.0.2 中才fixed.

 

 

错误描述:

ORA-04020: deadlock detected while trying to lock object SYS.CDC_ALTER_CTABLE_BEFORE

Researching the issue on ora-4020 and SYS.CDC_CREATE_CTABLE_BEFORE lead to BUG 3228083 which was
experiencing similar problems on the same object. This bug was closed as a duplicate of bug 3017048.

Internal BUG:3228083 - Appsst10g:R8:Utlrcmp Error: Ora-04045: Sys.Cdc_Create_Ctable_Before

 

解决方法, spfile 创建pfile, pfile里添加如下内容,然后用修改之后的pfile启动数据库,在执行脚本。

_system_trig_enabled=false
aq_tm_processes=0
job_queue_processes=0

脚本执行完后,在去掉这些参数,正常启动数据库即可。  具体参考下面的2个资料。

 

资料一

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1
This problem can occur on any platform.
Checked for relevance on 13-Aug-2009.

Symptoms

Running catalog.sql fails with and ORA-4020
ORA-04020: deadlock detected while trying to lock object SYS.CDC_ALTER_CTABLE_BEFORE

.
Verified the issue by the created trace file which shows the following:

ORA-04020: deadlock detected while trying to lock object SYS.CDC_ALTER_CTABLE_BEFORE
object waiting waiting blocking blocking
handle session lock mode session lock mode
-------- -------- -------- ---- -------- -------- ----
39039ccd8 3892cf7f0 38b77a680 X 3892cf7f0 38b470910 X
---------- DUMP OF WAITING AND BLOCKING LOCKS ----------
------------- WAITING LOCK -------------
SO: 38b77a680, type: 51, owner: 38aaf3cc0, flag: INIT/-/-/0x00
LIBRARY OBJECT LOCK: lock=38b77a680 handle=39039ccd8 request=X
call pin=0 session pin=0
htl=38b77a6f0[38b470980,38b449af8] htb=38b449af8
user=3892cf7f0 session=3892d0d10 count=0 flags=[00] savepoint=5860866
LIBRARY OBJECT HANDLE: handle=39039ccd8
name=SYS.CDC_ALTER_CTABLE_BEFORE
hash=bae60924 timestamp=03-07-2006 10:29:15
namespace=TRGR flags=KGHP/TIM/SML/[02000000]
kkkk-dddd-llll=0000-00ff-00ff lock=X pin=X latch#=3
lwt=39039cd08[38b77a6a0,38b77a6a0] ltm=39039cd18[39039cd18,39039cd18]
pwt=39039cd38[39039cd38,39039cd38] ptm=39039cdc8[39039cdc8,39039cdc8]
ref=39039cce8[39039cce8, 39039cce8] lnd=39039cde0[39039cde0,39039cde0]
LOCK OWNERS:
lock user session count mode flags
-------- -------- -------- ----- ---- ------------------------
38b470910 3892cf7f0 3892d0d10 2 X [00]
LOCK WAITERS:
lock user session count mode
-------- -------- -------- ----- ----
38b77a680 3892cf7f0 3892d0d10 0 X
PIN OWNERS:
pin user session lock count mode mask
-------- -------- -------- -------- ----- ---- ----
38b472560 3892cf7f0 3892d0d10 0 2 X 00ff
LIBRARY OBJECT: object=3923ed1a8
type=TRGR flags=EXS/LOC/BCM/ALT[0025] pflags=NST [101] status=INVL load=0

Cause

This is cause by internal bug 3017048 fixed in 10.1.0.2.

Internal BUG:3017048 - Ora-4020, Functional Index Locking During Invalidation Causing Self-Deadlock

Researching the issue on ora-4020 and SYS.CDC_CREATE_CTABLE_BEFORE lead to BUG 3228083 which was
experiencing similar problems on the same object. This bug was closed as a duplicate of bug 3017048.

Internal BUG:3228083 - Appsst10g:R8:Utlrcmp Error: Ora-04045: Sys.Cdc_Create_Ctable_Before

.

Solution

Set the following in the INIT.ORA then restart the database:

_system_trig_enabled=false
aq_tm_processes=0
job_queue_processes=0

Then rerun CATALOG.SQL.


After creating and running these scripts and the database is ok then restart the database with the parameters taken out of the init.ora.


As an Alternative, if your application is not using CDC, we can disable these triggers as follows:

SQL> conn / as sysdba
SQL> ALTER TRIGGER sys.cdc_alter_ctable_before DISABLE;
SQL> ALTER TRIGGER sys.cdc_create_ctable_after DISABLE;
SQL> ALTER TRIGGER sys.cdc_create_ctable_before DISABLE;
SQL> ALTER TRIGGER sys.cdc_drop_ctable_before DISABLE;

This will also prevent the deadlock from occurring.

 

 

 

 

 

资料二

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.8 and later   [Release: 9.2 and later ]
Information in this document applies to any platform.

Symptoms

Catproc.sql fails with the following error:

ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.DBMS_STANDARD
ORA-04021: timeout occurred while waiting to lock object SYS.CDC_ALTER_CTABLE_BEFORE

Cause

Trying to create a database from a database that already exists.

Solution

1. Modify init.ora to contain:

_system_trig_enabled=FALSE
job_queue_processes=0
aq_tm_processes=0

Save init.ora


(The following are to be completed from sqlplus as the SYS user)


2. Issue a shutdown immediate: 
    SQL> shutdown immediate

3. SQL>startup pfile='<insert full path of init.ora here>'

4. SQL>@catalog.sql

5. SQL>@catproc.sql

6. Check for invalids from dba_objects:

    SQL> select owner, object_name from dba_objects where status='INVALID';

7. Run utlrp.sql: 
    SQL>@utlrp.sql

8. Check for invalids again.

SQL> select owner, object_name from dba_objects where status='INVALID';

 

 

 

 

 

------------------------------------------------------------------------------

QQ: 492913789
Email: ahdba@qq.com
Blog: http://www.cndba.cn/dave

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977()

DBA3 群:62697850   DBA 超级群:63306533;    

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

这篇关于Oracle 9i 升级中的bug-- Sys.Cdc_alter_ctable_before ORA-04020 deadlock detected while trying to lock obj的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/874719

相关文章

Oracle数据库使用 listagg去重删除重复数据的方法汇总

《Oracle数据库使用listagg去重删除重复数据的方法汇总》文章介绍了在Oracle数据库中使用LISTAGG和XMLAGG函数进行字符串聚合并去重的方法,包括去重聚合、使用XML解析和CLO... 目录案例表第一种:使用wm_concat() + distinct去重聚合第二种:使用listagg,

怎么关闭Ubuntu无人值守升级? Ubuntu禁止自动更新的技巧

《怎么关闭Ubuntu无人值守升级?Ubuntu禁止自动更新的技巧》UbuntuLinux系统禁止自动更新的时候,提示“无人值守升级在关机期间,请不要关闭计算机进程”,该怎么解决这个问题?详细请看... 本教程教你如何处理无人值守的升级,即 Ubuntu linux 的自动系统更新。来源:https://

oracle中exists和not exists用法举例详解

《oracle中exists和notexists用法举例详解》:本文主要介绍oracle中exists和notexists用法的相关资料,EXISTS用于检测子查询是否返回任何行,而NOTE... 目录基本概念:举例语法pub_name总结 exists (sql 返回结果集为真)not exists (s

Oracle的to_date()函数详解

《Oracle的to_date()函数详解》Oracle的to_date()函数用于日期格式转换,需要注意Oracle中不区分大小写的MM和mm格式代码,应使用mi代替分钟,此外,Oracle还支持毫... 目录oracle的to_date()函数一.在使用Oracle的to_date函数来做日期转换二.日

oracle数据库索引失效的问题及解决

《oracle数据库索引失效的问题及解决》本文总结了在Oracle数据库中索引失效的一些常见场景,包括使用isnull、isnotnull、!=、、、函数处理、like前置%查询以及范围索引和等值索引... 目录oracle数据库索引失效问题场景环境索引失效情况及验证结论一结论二结论三结论四结论五总结ora

Oracle Expdp按条件导出指定表数据的方法实例

《OracleExpdp按条件导出指定表数据的方法实例》:本文主要介绍Oracle的expdp数据泵方式导出特定机构和时间范围的数据,并通过parfile文件进行条件限制和配置,文中通过代码介绍... 目录1.场景描述 2.方案分析3.实验验证 3.1 parfile文件3.2 expdp命令导出4.总结

你的华为手机升级了吗? 鸿蒙NEXT多连推5.0.123版本变化颇多

《你的华为手机升级了吗?鸿蒙NEXT多连推5.0.123版本变化颇多》现在的手机系统更新可不仅仅是修修补补那么简单了,华为手机的鸿蒙系统最近可是动作频频,给用户们带来了不少惊喜... 为了让用户的使用体验变得很好,华为手机不仅发布了一系列给力的新机,还在操作系统方面进行了疯狂的发力。尤其是近期,不仅鸿蒙O

Oracle数据库执行计划的查看与分析技巧

《Oracle数据库执行计划的查看与分析技巧》在Oracle数据库中,执行计划能够帮助我们深入了解SQL语句在数据库内部的执行细节,进而优化查询性能、提升系统效率,执行计划是Oracle数据库优化器为... 目录一、什么是执行计划二、查看执行计划的方法(一)使用 EXPLAIN PLAN 命令(二)通过 S

log4j2相关配置说明以及${sys:catalina.home}应用

${sys:catalina.home} 等价于 System.getProperty("catalina.home") 就是Tomcat的根目录:  C:\apache-tomcat-7.0.77 <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %msg%n" /> 2017-08-10

macOS升级后SVN升级

问题 svn: error: The subversion command line tools are no longer provided by Xcode. 解决 sudo chown -R $(whoami) /usr/local/Cellar brew install svn