Oracle
Tips/Questions and Answers:
|
More Resources by
Google: |
|
|
|
|
Question: When
I run the export utility, I get the following error:
ORA-04020: deadlock detected while trying to lock object SYS.CDC_ALTER_CTABLE_BEFORE
How can I fix
the problem?
Oracle Server - Enterprise Edition - Version: 9.2.0.7.0
This problem can occur on any platform. One reason that you get this problem is:
you may have imported the lower version of exported dump with full option and
didn't migrate or run migration option. If that is the case then jump to the MIGRATE
section.
Check the issue by the trace file in
the $ORACLE_BASE/<SID>/udump/<SID>_ora_27421.trc which will show you
the above error message with locks warning with the following statements.
LOCK OWNERS:
lock user session count mode flags
-------- -------- -------- ----- ----
LOCK WAITERS:
lock user session count mode
-------- -------- -------- ----- ----
PIN OWNERS:
pin user session lock count mode mask
-------- -------- -------- ----- ----
LIBRARY OBJECT: object=3923ed1a8
To fix the problem do the following
steps:
Step #1: 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 and UTLRP.SQL in the $ORACLE_HOME/rdbms/admin directory as user sys
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.
MIGRATE:
imported data from lower version of oracle
If this didn't solve your problem
then do the following:
Run the catpatch.sql script to apply CATalog PATCH set to a database.
This script encapsulates the "post install" steps necessary to migrate the dictionary to the new patchset version.
It runs the new patchset versions of catalog.sql and catproc.sql and calls the component patch scripts.
Notice: The database must be open for MIGRATE
SQL> CONNECT / AS SYSDBA
SQL> STARTUP MIGRATE
SQL> @$ORACLE_HOME/dbms/admin/catpatch.sql
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP
The try to run your export utility.
Good Luck!
|