Upgraded to 11.2.x from older version.
Encountered the following errors:
ORA-04067: not executed, package body "SYS.DBMS_METADATA" does not exist
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_METADATA"
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_METADATA"
The following query shows that dbms_metadata package specification is present but the package body is missing:
SELECT owner, object_name, object_type, status
FROM dba_objects
WHERE object_name like '%DBMS_METADATA%'
ORDER BY 1,2,3;
OWNER OBJECT_NAME OBJECT_TYPE STATUS
----------- -------------------------------- --------------- -------
PUBLIC DBMS_METADATA SYNONYM VALID
PUBLIC DBMS_METADATA_BUILD SYNONYM VALID
PUBLIC DBMS_METADATA_DIFF SYNONYM VALID
PUBLIC DBMS_METADATA_DPBUILD SYNONYM VALID
SYS DBMS_METADATA PACKAGE VALID >>>>>
SYS DBMS_METADATA_BUILD PACKAGE VALID
SYS DBMS_METADATA_BUILD PACKAGE BODY VALID
SYS DBMS_METADATA_DIFF PACKAGE VALID
SYS DBMS_METADATA_DIFF PACKAGE BODY VALID
SYS DBMS_METADATA_DPBUILD PACKAGE VALID
SYS DBMS_METADATA_DPBUILD PACKAGE BODY VALID
SYS DBMS_METADATA_INT PACKAGE VALID
SYS DBMS_METADATA_INT PACKAGE BODY VALID
SYS DBMS_METADATA_UTIL PACKAGE VALID
SYS DBMS_METADATA_UTIL PACKAGE BODY VALID
FROM dba_objects
WHERE object_name like '%DBMS_METADATA%'
ORDER BY 1,2,3;
OWNER OBJECT_NAME OBJECT_TYPE STATUS
----------- -------------------------------- --------------- -------
PUBLIC DBMS_METADATA SYNONYM VALID
PUBLIC DBMS_METADATA_BUILD SYNONYM VALID
PUBLIC DBMS_METADATA_DIFF SYNONYM VALID
PUBLIC DBMS_METADATA_DPBUILD SYNONYM VALID
SYS DBMS_METADATA PACKAGE VALID >>>>>
SYS DBMS_METADATA_BUILD PACKAGE VALID
SYS DBMS_METADATA_BUILD PACKAGE BODY VALID
SYS DBMS_METADATA_DIFF PACKAGE VALID
SYS DBMS_METADATA_DIFF PACKAGE BODY VALID
SYS DBMS_METADATA_DPBUILD PACKAGE VALID
SYS DBMS_METADATA_DPBUILD PACKAGE BODY VALID
SYS DBMS_METADATA_INT PACKAGE VALID
SYS DBMS_METADATA_INT PACKAGE BODY VALID
SYS DBMS_METADATA_UTIL PACKAGE VALID
SYS DBMS_METADATA_UTIL PACKAGE BODY VALID
Cause :
SYS DBMS_METADATA PACKAGE BODY is missing.
SOLUTION :
Install the missing dbms_metadata package body by running the sript that recreates it.
This can be done by running the script as SYSDBA via SQLPlus:
This can be done by running the script as SYSDBA via SQLPlus:
$ORACLE_HOME/rdbms/admin/prvtmeta.plb
$ORACLE_HOME/rdbms/admin/utlrp.sql
$ORACLE_HOME/rdbms/admin/utlrp.sql
Check to see if that package body exists now..
Check to see if this or other objects became invalid.
If there are errors doing this or if it fails, run the $ORACLE_HOME/rdbms/admin/catproc.sql script in startup restrict mode.
In either case, ensure that a current working backup is in place before doing this.
No comments:
Post a Comment