ITPub博客

首页 > 数据库 > Oracle > ORA-04063: package body SYS.DBMS_REGISTRY_SYS has errors (Doc ID 2165402.1)

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

原创 Oracle 作者:lhrbest 时间:2021-04-16 16:31:13 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
【QQ:646634621】【微信:db_bao】【微信公众号:DB宝】【QQ群:230161599】【OracleOCP、OCM、高可用(RAC+DG+OGG)、MySQL和PostgreSQL培训班已开讲,只讲工作内容】【个人网站:xmmup.com】

注册时间:2012-09-23

  • 博文量
    1618
  • 访问量
    9894034