Oracle datapatch errors ORA-29913 ORA-25153

After successfully applying the database patch on the binary, the next step is to run the datapatch, however when running it….it failed with below errors:

./datapatch –verbose

SQL Patching tool version 12.1.0.2.0 Production on Wed May  1 10:03:02 2019

Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /orcl/oradbx26/cfgtoollogs/sqlpatch/sqlpatch_79352_2019_05_01_10_03_02/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

/orcl/oradbx26/cfgtoollogs/sqlpatch/sqlpatch_79352_2019_05_01_10_03_02/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

/orcl/oradbx26/cfgtoollogs/sqlpatch/sqlpatch_79352_2019_05_01_10_03_02/sqlpatch_invocation.log

for information on how to resolve the above errors.

SQL Patching tool complete on Wed May  1 10:03:08 2019

Solution:

After reviewing the log file sqlpatch_invocation.log:

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

so I have executed the following query:

SQL> select * from OPATCH_XML_INV ;

ERROR:

ORA-29913: error in executing ODCIEXTTABLEFETCH callout

ORA-25153: Temporary Tablespace is Empty

So this is an indication of temporary tabelspace issue, so I have first created a “new” temporary tablespace:

SQL> CREATE TEMPORARY TABLESPACE TEMP_DATA_02 TEMPFILE

  ‘/oradata1/oradbx26/TEMPTD01.dbf’ SIZE 120M AUTOEXTEND ON

TABLESPACE GROUP ”

EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

Then, I have made the new temporary tablespace the default one:

SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_DATA_02;

And finally dropped the old temporary tablespace:

SQL> DROP TABLESPACE TEMP_DATA_01 INCLUDING CONTENTS AND DATAFILES;

 

I hope this helps someone !

 

Oracle PSU July 2018 error – ORA-20001: Latest xml inventory is not loaded into table

while applying latest Oracle PSU released in July 2018 for 12.1.0.2 release i have faced the following when i reached the “data patch” level:

myhostt1:orax1> ./datapatch -verbose

SQL Patching tool version 12.1.0.2.0 Production on Thu Jul 19 10:53:37 2018

Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /oracle/orax1/cfgtoollogs/sqlpatch/sqlpatch_109246_2018_07_19_10_53_37/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

/oracle/orax1/cfgtoollogs/sqlpatch/sqlpatch_109246_2018_07_19_10_53_37/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

/oraclex/oradbt14/cfgtoollogs/sqlpatch/sqlpatch_109246_2018_07_19_10_53_37/sqlpatch_invocation.log

for information on how to resolve the above errors.

SQL Patching tool complete on Thu Jul 19 10:53:41 2018

if you try to execute the following query:

SQL> select * from OPATCH_XML_INV ;

ERROR:

ORA-29913: error in executing ODCIEXTTABLEFETCH callout

ORA-29400: data cartridge error

KUP-04004: error while reading file

/oracle/orax1/product/12.1.0.2/QOpatch/qopiprep.bat

 

SQL> select dbms_sqlpatch.verify_queryable_inventory from dual;

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

 

SOLUTION:

first, you need to download the latest OPatch utility 12.2.0.1.14

second, the error i have faced due to that i am invoking the opatch utility outside ORACLE_HOME…… now you need copy it in your oracle home directory ( its a must ! )

cd $ORACLE_HOME
mv $ORACLE_HOME/OPatch.orig
mkdir OPatch
cd OPatch
scp -r /newopatch/OPatch/* .

a good reference is Doc ID 1602089.1