`Hi All,

I was getting below below error while upgrading oracle from 19.3 to 19.20 but i was able to proceed after provideing jdk arguments explicitly.

Error:

/data/LINUX.X64_193000_db_home/OPatch/opatch: line 843: [: too many arguments /data/LINUX.X64_193000_db_home/OPatch/opatch: line 843: [: too many arguments Java (1.7) could not be located. OPatch cannot proceed! 

Succeeded with jdk argument:

$ORACLE_HOME/OPatch/opatch apply -jdk $ORACLE_HOME/jdk 

but after this, I am getting below error while trying to apply datapatch -verbose.

Error with data patch verbose:

Connecting to database...OK Gathering database info...done Bootstrapping registry and package to current versions...done Error: prereq checks failed! verify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table Prereq check failed, exiting without installing any patches.

Please refer to MOS Note 1609718.1 and/or the invocation log /data/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_770698_2023_09_13_12_44_11/sqlpatch_invocation.log for information on how to resolve the above errors.

SQL Patching tool complete on Wed Sep 13 12:44:13 2023

As per google solution, I tried to execute query : select * from OPATCH_XML_INV ; which again gives same problem. select * from OPATCH_XML_INV ; ERROR:

ORA-29913: error in executing ODCIEXTTABLEFETCH callout ORA-29400: data cartridge error KUP-04095: preprocessor command /data/LINUX.X64_193000_db_home/QOpatch/qopiprep.bat encountered error "/data/LINUX.X64_193000_db_home/OPatch/opatch: line 843: [: too many arguments /data/LINUX.X64_193000_db_home/OPatch/opatch: line 843: [: too many arguments 

Question:

  1. How to resolve this problem?
  2. Is data patch -verbose execution is required as my current patch level is already showing 19.20?

I observed that issue is with finding java version or with java home so i already tried hardcoding JAVA_HOME in opatch.`

1 Answer

I got the same error and its not installing the patches because data patch is not running.

SELECT TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time, action, status, description, patch_id FROM sys.dba_registry_sqlpatch ORDER by action_time;SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5 6 7

ACTION_TIME ACTION STATUS DESCRIPTION PATCH_ID


2023-10-26 APPLY SUCCESS Database Release Update : 19.3.0.0.190416 (29517242) 29517242

SQL> SQL>

issue is the exact thing you mentioned, JAVA_HOME is not getting interpreted correctly, workaround for this is I edited qopiprep.bat file, in the qopiprep.bat also we are calling the opatch:

$ORACLE_HOME/OPatch/opatch lsinventory -customLogDir $ORABASE/rdbms/log -jdk $ORACLE_HOME/jdk -xml $ORABASE/rdbms/log/xml_file_${DBSID}_${PD}.xml -retry 0 -invPtrLoc $ORACLE_HOME/oraInst.loc >> $ORABASE/rdbms/log/stout_${DBSID}_${PD}.txt 

RETVAL=$?;

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.