Issue in datapatch verbose command during patching in Oracle
Error:
Error at line 1290: Warning: Package Body created with compilation errors.
Error at line 1297: 10/5 PL/SQL: Statement ignored.
Error at line 1298: 10/49 PLS-00201: identifier 'SYS.UTL_RECOMP2' must be declared.
Error at line 1486: Warning: Package Body created with compilation errors.
OR
Error at line 3360: 1161/5 PLS-00201: identifier 'UTL_FILE' must be declared
Cause:
The issue with the mentioned package “UTL_RECOMP2” OR “UTL_FILE” in Error does not have public access.
Solution:
You need to assign the public access to the package coming in the error during datapatch verbose:
Login with sysdba user.
SQLPLUS / as sysdba
Grant the EXECUTE privilege to public.
grant execute on UTL_FILE to public ;
Run the utlrp.sql to compile all the invalid objects:
@?\rdbms\admin\utlrp.sql
Rerun the datapatch -verbose command to execute.