Quantcast
Channel: zaheer.appsdba's Groups Activities
Viewing all articles
Browse latest Browse all 74

ORA-04063: package body “APPS.AD_ZD_ADOP” has errors

$
0
0

On one of the customer TEST environment adop prepare phase was failing with the following error. As per the error message initially i thought its failing because of the the wrong entries in the fnd_nodes.

[applerp@erpnode3 patch]$ adop phase=prepare

Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:

Validating credentials.

Initializing.
Run Edition context : /u01/appl_PROD/PROD/fs1/inst/apps/PRODERP_erpnode3/appl/admin/PRODERP_erpnode3.xml
Patch edition context: /u01/appl_PROD/PROD/fs2/inst/apps/PRODERP_erpnode3/appl/admin/PRODERP_erpnode3.xml
Patch file system free space: 67.66 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)
[applerp@erpnode3 patch]$

Cause :

Package “APPS.AD_ZD_ADOP” is not valid.

SQL> SELECT ad_zd_adop.get_node_type('erpnode3') FROM DUAL;
SELECT ad_zd_adop.get_node_type('erpnode3') FROM DUAL
*
ERROR at line 1:
ORA-04063: package body "APPS.AD_ZD_ADOP" has errors
SQL>

This package became invalid due to incorrect execution of adgrants.sql script. We should always execute the correct version of the adgrants.sql. We should ensure we have applied “adgrants.sql” script from the the applied AD code level.

 Solution:

Execute adgrants.sql script after copoying from the ADPatch directory to $ORACLE_HOME/appsutil/admin directory. Its required to copy the script in ” $ORACLE_HOME/appsutil/admin” only to avoid any issues as the same is documented in MOS.

[oracle@erpnode3 admin]$ ls
adgrants.sql
[oracle@erpnode3 admin]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Tue Nov 29 10:03:28 2016

Copyright (c) 1982, 2014, Oracle. All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> @adgrants.sql APPS
Connected.
---------------------------------------------------
--- adgrants.sql started at 2016-11-29 10:03:38 ---
Creating PL/SQL profiler objects.

---------------------------------------------------
--- profload.sql started at 2016-11-29 10:03:38 ---
Session altered.
Package created.
Grant succeeded.
Synonym created.
Session altered.
Session altered.
Library created.
Package body created.
Session altered.

Testing for correct installation
SYS.DBMS_PROFILER successfully loaded.

PL/SQL procedure successfully completed.

-----------------------------------------------------
--- profload.sql completed at 2016-11-29 10:03:43 ---

--------------------------------------------------
--- proftab.sql started at 2016-11-29 10:03:43 ---
Table dropped.
Table dropped.
Table dropped.
Sequence dropped.
Table created.
Comment created.
Table created.
Comment created.
Table created.
Comment created.
Sequence created.

-----------------------------------------------------
--- profltab.sql completed at 2016-11-29 10:03:45 ---
Installing Hierarchical Profiler.
Table dropped.
Table dropped.
Table dropped.
Sequence dropped.
Table created.
Comment created.
Table created.
Comment created.
Table created.
Comment created.
Sequence created.
Session altered.
Package created.
Synonym created.
Session altered.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Loading Stylesheets if missing
PL/SQL procedure successfully completed.
Start of Creating AD_JAR context
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
End of Creating AD_JAR context
Creating PL/SQL Package AD_DBMS_METADATA.
Package created.
Package body created.
End of Creating PL/SQL Package AD_DBMS_METADATA.
Creating PL/SQL Package AD_ZD_SYS.
Package created.
Package body created.
End of Creating PL/SQL Package AD_ZD_SYS.
Start of Creating PL/SQL Package AD_GRANTS.
Package created.
Package body created.
Commit complete.
End of Creating PL/SQL Package AD_GRANTS.

Start of giving grants. This may take few minutes.

PL/SQL procedure successfully completed.
Start of PURGE DBA_RECYCLEBIN.
PL/SQL procedure successfully completed.
End of PURGE DBA_RECYCLEBIN.
Commit complete.

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@erpnode3 admin]$

After execution of “adgrants.sql” the package “APPS.AD_ZD_ADOP” became valid.

Check the package status:

SQL*Plus: Release 10.1.0.5.0 - Production on Tue Nov 29 11:08:25 2016

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter user-name: apps
Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> SELECT ad_zd_adop.get_node_type('erpnode3') FROM DUAL;

AD_ZD_ADOP.GET_NODE_TYPE('ERPNODE3')
------------------------------------
1

SQL>

 

once the package becomes valid, adop prepare phase completed successfully with status “0”

Hope it helps.

Thanks for reading :)

regards,

X A H E E R

 


Viewing all articles
Browse latest Browse all 74

Trending Articles