ORA-04063: package body SYS.DBMS_REGISTRY_SYS has errors (Doc ID 2165402.1)

lhrbest發表於2021-04-16

ORA-04063: package body SYS.DBMS_REGISTRY_SYS has errors (Doc ID 2165402.1)


APPLIES TO:

Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud 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 Backup Service - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

After applying the JAN 2016 cpu patch on the QA super cluster 2 node RAC database initially it look like everything is working fine but later found that any action in the database except switching the archivelog and bouncing the database all the other commands are failing. 

When tried to run utlrp script it throw below error.


ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_REGISTRY_SYS"
ORA-06512: at line 1

 

CHANGES

Applied JAN 2016 CPU Patch

CAUSE

dba_registry is invalid
 
While executing the utlrp script below error was reported.

ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_REGISTRY_SYS"
ORA-06512: at line 1

 

SOLUTION

Recreate the DBMS_REGISTRY package and the DBA_REGISTRY view.

Backup database before performing below in case any failure.

Connect as SYSDBA and run the below scripts. 

$sqlplus / as sysdba
$SQL> shutdown immediate
$SQL> startup upgrade
$SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql
$SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql
$SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
$SQL> shutdown immediate
$SQL> startup

After running the above script, run the below sql and make sure all the components in dba_registry should be valid

SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

SQL> select * from dba_registry_history;

 

 

BTW: Recreate database can also be a workaround of last resort



How To Validate an Invalid SYS.DBMS_REGISTRY_SYS Package (Doc ID 438821.1)



In this Document


Goal

Solution

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.2 and later
Information in this document applies to any platform.


GOAL

SYS.DBMS_REGISTRY_SYS package is invalid. 
Ran the ORACLE_HOME/rdbms/admin/utlrp.sql script to recompile the invalid objects, but still status of SYS.DBMS_REGISTRY_SYS package is invalid.

SOLUTION

SYS.DBMS_REGISTRY_SYS is corrupted and to validate the package, it needs to be recreated using the following script: 

$sqlplus "/as sysdba" 
SQL>@?/rdbms/admin/prvtcr.plb; 
SQL>@?/rdbms/admin/utlrp.sql



This scripts will recreate the package and compile. The status should be valid upon completion.



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2768422/,如需轉載,請註明出處,否則將追究法律責任。

相關文章