09 November, 2021

ORA-04063: Package Body "APPS.AD_ZD_ADOP" Has Errors when running adop

While running adop prepare,  the error is encountered on APPS.AD_ZD_ADOP . 

When checking further the package body is in invalid state.



Error:

When we try to compile manually, we observe below error.


SQL> alter package APPS.AD_ZD_ADOP compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.AD_ZD_ADOP:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2686/3 PL/SQL: Statement ignored
2686/7 PLS-00201: identifier 'SYS.DBMS_METADATA_UTIL' must be declared


Solution:


1. Connect as sysdba and 
   grant execute on DBMS_METADATA_UTIL to apps;
2. alter package APPS.AD_ZD_ADOP compile body;

The package should be compiled normally now.

Useful Scripts

To Find session details using SID. set verify off col sid format 99999 col machine format a10 col program format a25 trunc col username form...