Pages

Search This Blog

Wednesday, February 19, 2020

datapatch -verbose failed.

Issue Details:

We have applied JAN 2020 PSU patch 30340202 on our 12.1.0.2 database.

As post patch step, we need to run datapatch -versbose, when we run that it failed with below error.


cd $ORACLE_HOME/OPatch
./datapatch -verbose

oracle@mydbserver /ora/db/tech_st/12.1.0.2/OPatch

ORCL-DB: ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Wed Feb 19 09:52:12 2020
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /ora/db/tech_st/12.1.0.2/cfgtoollogs/sqlpatch/sqlpatch_10280_2020_02_19_09_52_12/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done

Queryable inventory could not determine the current opatch status.
Execute 'select dbms_sqlpatch.verify_queryable_inventory from dual'
and/or check the invocation log
/ora/db/tech_st/12.1.0.2/cfgtoollogs/sqlpatch/sqlpatch_10280_2020_02_19_09_52_12/sqlpatch_invocation.log
for the complete error.
Prereq check failed, exiting without installing any patches.

Please refer to MOS Note 1609718.1 and/or the invocation log
/ora/db/tech_st/12.1.0.2/cfgtoollogs/sqlpatch/sqlpatch_10280_2020_02_19_09_52_12/sqlpatch_invocation.log
for information on how to resolve the above errors.

SQL Patching tool complete on Wed Feb 19 09:52:40 2020




Upon checking we got the below error in the database.

SQL> select dbms_sqlpatch.verify_queryable_inventory from dual;

VERIFY_QUERYABLE_INVENTORY
--------------------------------------------------------------------------------
ORA-20001: Latest xml inventory is not loaded into table




Solution:

This is due ot java, java is pointing to operating system local java(/usr/bin/java) not to the $ORACLE_HOME/jdk/jre/bin/java.

 oracle@mydbserver /ora/db/tech_st/12.1.0.2/OPatch
ORCL-DB: which java
/usr/bin/java
oracle@mydbserver /ora/db/tech_st/12.1.0.2/OPatch
ORCL-DB: export PATH=$ORACLE_HOME/jdk/jre/bin:$PATH:.
oracle@mydbserver /ora/db/tech_st/12.1.0.2/OPatch
ORCL-DB: which java
/ora/db/tech_st/12.1.0.2/jdk/jre/bin/java
oracle@mydbserver /ora/db/tech_st/12.1.0.2/OPatch



Retested the issue and again it failed with same error.

When we check with Oracle Support team, they suggest to run datapatch verbose as shown below.

datapatch -apply 30340202 -force -verbose -bundle_series DBPSU

Issue fixed !!!

No comments:

Post a Comment