Skip to main content

datapatch -verbose failed in RAC environment with error ORA-2006


Here is another issue that you can encounter during patching, but its simple. Sometimes we just miss to look into the basic checks and the same has happened during this patching activity. This is two node RAC cluster and we were applying the July 2017 PSU. The patch executed successfully on both the nodes but while executing the datapatch, it was failed with ORA-2006. We were not able to fix the issue after trying multiple workarounds.

And finally, After trying for two hours when we looked back into the node1(rac010. OMG !!!!!!!!  What's this?

The qopiprep.bat file is missing from QOpatch directory instead it contains all OPatch  files as below and datatpatch is failing with ORA-2006 error.


[oracle@rac01 QOpatch]$ cd $ORACLE_HOME/QOpatch
[oracle@rac01 QOpatch]$ ls -ltr
total 164
-rw-r--r--. 1 oracle oinstall  2576 May  6  2009 opatch.pl
-rw-r--r--. 1 oracle oinstall 23695 Aug  2  2010 emdpatch.pl
-rwx--x---. 1 oracle oinstall  9352 Mar 31  2011 opatchdiag.bat
-rwx--x---. 1 oracle oinstall 10056 Mar 31  2011 opatchdiag
-rwx--x---. 1 oracle oinstall   569 Aug 12  2012 datapatch.bat
-rwx--x---. 1 oracle oinstall   537 Aug 12  2012 datapatch
-rwx--x---. 1 oracle oinstall 20009 Dec 29  2013 opatch.bat
-rwx--x---. 1 oracle oinstall 24478 Jan 26  2014 opatchauto
-rwx--x---. 1 oracle oinstall 33889 Mar 26  2014 opatch
drwxr-xr-x. 5 oracle oinstall  4096 Aug 24  2016 ocm
drwxr-xr-x. 4 oracle oinstall  4096 Aug 24  2016 opatchprereqs
drwxr-xr-x. 2 oracle oinstall  4096 Aug 24  2016 jlib
drwxr-xr-x. 2 oracle oinstall  4096 Aug 24  2016 docs
drwxr-xr-x. 3 oracle oinstall  4096 Aug 24  2016 oplan
-rw-r--r--. 1 oracle oinstall    49 Aug 24  2016 opatch.ini

Solution:-

1.) Cleanup the existing QOpatch directory.
     [oracle@rac01 db_1]$ rm -rf  QOpatch

2.) Tar and transfer the QOpatch directory from other node(rac02).
      [oracle@rac02 db_1]$ tar -cvf QOpatch.tar QOpatch/
      [oracle@rac02 db_1]$ scp QOpatch.tar rac01:/u01/app/oracle/product/12.1.0.2/db_1

      [oracle@rac01 db_1]$ tar -xvf QOpatch.tar

3.) Run the datapatch again from node2 (rac02).

     [oracle@rac02 Opatch]$./datapatch -verbose


Note:- Always perform test, test and test before going into production.

Comments

Popular posts from this blog

ORA-29913: error in executing ODCIEXTTABLEOPEN callout

While running oracle datapatch in 12c, ORA-29913 error raised due to corrupted external table. The error you might see while running the datapatch after patching. $ ./datapatch -verbose Connecting to database...OK Determining current state... Currently installed SQL Patches: 18522516 DBD::Oracle::st execute failed: ORA-04063: package body "SYS.DBMS_QOPATCH" has errors ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_QOPATCH" ORA-06512: at line 4 (DBD ERROR: OCIStmtExecute) [for Statement "DECLARE x XMLType; BEGIN x := dbms_qopatch.get_pending_activity; ? := x.getStringVal(); END;" with ParamValues: :p1=undef] at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 1293. or Connecting to database...OK catcon: ALL catcon-related output will be written to /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_53150146_2017_05_09_21_37_14/sqlpatch_catcon__catcon_53150146.lst catcon: See /u01/app/oracle/cfgtoollogs/sqlpatc

datapatch failed with error ORA-20009: Job Load_opatch_inventory_1execution failed

Today we have hit with issue while applying the OCT-2017 PSU. The Cluster and RDBMS software patched successfuly but while running the datapatch automation failed with below error. ERROR: Can't locate XML/Simple.pm in @INC (@INC contains: /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch /u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/lib /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/site_perl/5.14.1/x86_64-linux-thread-multi /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/site_perl/5.14.1 /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/5.14.1/x86_64-linux-thread-multi /u01/app/oracle/product/12.1.0.2/db_1/perl/lib/5.14.1 .) at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 173. BEGIN failed--compilation aborted at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pm line 173. Compilation failed in require at /u01/app/oracle/product/12.1.0.2/db_1/sqlpatch/sqlpatch.pl line 64. BEGIN failed--compilatio

datapatch failed with ORA-27477: "SYS"."LOAD_OPATCH_INVENTORY_X" already exists

We have received the below error while working on the 6-node cluster patching. The patch has been applied on software GRID and RDBMS on all the node but the datapatch execution is failed with ORA-27477. rac06:dbp01:/u01/app/oracle/product/12.1.0.2/database/OPatch$ ./datapatch -verbose SQL Patching tool version 12.1.0.2.0 on Wed Oct 25 12:55:45 2017 Copyright (c) 2016, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/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 /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/sqlpatch_invocation.log for the complete error. Prereq check failed, exiting without installing any patches. Solution:  The