adop prepare phase was failing with the following error in customer test environment.
echo $FILE_EDITION
run
echo $TWO_TASK
test
adop phase=prepare
Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:
Validating credentials.
Initializing.
Run Edition context : /u01/apps/fs1/inst/test_erptest/appl/admin/test_erptest.xml
Patch edition context: /u01/apps/fs2/inst/test_erptest/appl/admin/test_erptest.xml
Patch file system free space: 89.80 GB
Validating system setup.
[ERROR] Failed to execute SQL statement:
select AD_ZD_ADOP.GET_INVALID_NODES() from dual
[ERROR] Error Message:
[ERROR] ORA-04063: package body "APPS.AD_ZD_ADOP" has errors (DBD ERROR: OCIStmtExecute)
[UNEXPECTED]Error determining whether this is a multi-node instance
[STATEMENT] Please run adopscanlog utility, using the command
"adopscanlog -latest=yes"
to get the list of the log files along with snippet of the error message corresponding to each log file.
adop exiting with status = 2 (Fail)
Cause :
Package “APPS.AD_ZD_ADOP” is not valid since this package became invalid due to incorrect execution of adgrants.sql script.
Solution:
SQL> alter package APPS.AD_ZD_ADOP compile body;
Warning: Package Body altered with compilation errors.
SQL> show error
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
SQL>
SQL> conn / as sysdba
Connected.
SQL> grant execute on DBMS_METADATA_UTIL to apps;
Grant succeeded.
SQL> conn apps
Enter password:
Connected.
SQL> alter package APPS.AD_ZD_ADOP compile body;
Package body altered.
adop phase=prepare
ADOP cycle completed without any further issues.
Thank you for reading.