datapatch issue PLS-00201: identifier must be declared.

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.