`
ijavagos
  • 浏览: 1189614 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

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

 
阅读更多

在将数据库从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;

Thiswill alsoprevent 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 tocreate 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';

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

Blog http://blog.csdn.net/tianlesoftware

网上资源: 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表空间和数据文件的关系,否则拒绝申请

分享到:
评论

相关推荐

    mysql-8.0.18-1.el7.x86_64.zip

    ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #更改加密方式 ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '自己的密码'; #更新用户密码 (我这里为root )

    LBM-C-0.1.zip_2d flow_Boltzmann fluid_LBM-3D_V2 _boltzmann_3D

    LBM-C is a lattice Boltzmann 2D and 3D fluid flow solver ... LBM-C is written in CUDA C and is licensed under GPL v2, you are invited to use, alter and improve upon LBM-C at your own discretion.

    SQL-statements-Collection.rar_Grant_sql statements

    下列语句部分是MsSql语句,不可以在access中使用。...DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)

    mysql-8.0.20-macos10.15-x86_64.tar.gz

    check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by "12345678"' at line 1 的错误,原因是新版本mysql版本把将创建账户和赋予权限分开了。 ...

    kafka_2.9.2-0.8.2.1.tgz

    bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic my-topic --config max.message.bytes=128000 bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic my-topic --deleteConfig max....

    oracle恢复工具-FY_Recover_Data

    15:33:19: [restore_table] Trying to restore data to SYS.TRUNTAB1$$2 15:33:20: [restore_table] Expected Records in this round: 411 15:33:20: [restore_table] 411 records recovered 此处省略N行输出.....

    graphviz-2.38.msi(windows下python图形工具)

    用于python中,某些图形的显示。... If you wish to use the command-line interface to Graphviz or are using some other program that calls a Graphviz program, you will need to set the PATH variable yourself.

    EurekaLog_7.5.0.0_Enterprise

    6)....Fixed: Wrong code page was used to decode ANSI bug reports 7)....Fixed: Attaching .PAS files instead of .OBJ in C++ Builder 2006+ Pro/Trial EurekaLog 7.2 Hotfix 1 (7.2.1.0), 3-April-2015 1).......

    Alta板卡软件及API手册-1553.zip_1553_API手册_Alta_alta板卡_板卡软件

    Alta板卡软件及API手册-1553 操作手册

    建立新年分区脚本.txt

    to_char(to_date(rq, 'yyyymmdd') + 1, 'YYYY-MM-DD HH24:MI:SS') || '''' || ',' || '''' || 'YYYY-MM-DD HH24:MI:SS' || '''' || '))' || 'tablespace ' || v_part_tablespace || ';' from (select to_char...

    oracle数据表解锁

    FROM ALL_OBJECTS A, V$LOCKED_OBJECT B, SYS.GV_$SESSION C, v$lock d WHERE (A.OBJECT_ID = B.OBJECT_ID) AND (B.PROCESS = C.PROCESS) and C.sid = d.sid and B.LOCKED_MODE = D.LMODE ORDER BY 1, 2; --...

    com.genuitec.eclipse.export.wizard_9.0.0.me201203160414.jar

    使用MyEclipse导出war包时,出现“security alter:integrity check error”的弹窗提示,这时可以用资源里的jar包替换掉原先对应的同名包。具体的方法:1.把对应的jar文件覆盖 MyEclipse\Common\plugins 安装目录中的...

    锁表问题解决

    Oracle锁表常用sql语句: select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sess ...

    com.genuitec.eclipse.export.wizard_9.0.0.me201211011550.jar

    使用MyEclipse10.7导出war包时,出现“security alter:integrity check error”的弹窗提示,这时可以用资源里的jar包替换掉原先对应的同名包。具体的方法如下:1.把对应的jar文件覆盖 MyEclipse\Common\plugins 安装...

    sql--help.rar_Help!

    相当有用的sql中文文档描述 很有用 alter select 功能很全面

    oracal的好程序

    SQL DDL table structure(column) create table alter table drop table DML table data(row) insert update delete

    orcale常用命令

    启动oracle9i数据库命令: $ sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Fri Oct 31 13:53:53 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL&gt; connect / as ...

    oracle实验报告

    本数据库(oracle)7个实验报告用于和大家交流,我将这次报告所需要的表和数据材料能够拿出来的都放了在同一个包里的,希望大家能够去看看并且多提点意见,同时我将第一个报告(手工创建数据库库)的记录也放在了包...

    oracle触发器实例讲解

    oracle触发器实例讲解2008-11-27 09:17--[6]// Oracle Trigger ---------------------------------------------------------------------------------------------// --实例1------------------------ --创建触发器...

    alter-openssh-version.sh

    alter-openssh-version.sh

Global site tag (gtag.js) - Google Analytics