Tuesday, 6 May 2014

Copy Action: Source file "/.patch_storage/Patch_name_Date_when_its_Installed/File_names" does not exist.

Today, I faced the following OPATCH issue when I tried to apply the PSU 11.2.0.3.9 on top of 11.2.0.3.4 DB_HOME. While applying its Opatch want me to rollback 14275572 patch so that it will proceed latest psu. While rolling back its not able to found the related directories which is related to rollback patch which was created during the time of this patch apply . Becuase we cleaned up .patch_storage to reclaim the space. Below is the error

$ORACLE_HOME/OPatch/opatch napply -oh /apps/oracle/product/db11gR2 -local /dd880/oracle/INSTALL_CDS/64BIT/11gR2/11.2.0.3.8_GI_DB_PSU/17076717/custom/server/17076717

OUTPUT:-

Patches [   14275572 ] will be rolled back.
Do you want to proceed? [y|n]
Start to wait for user-input at Mon May 05 16:03:59 CDT 2014
Finish waiting for user-input at Mon May 05 16:04:02 CDT 2014
User Responded with: Y
OPatch continues with these patches:   17076717
Do you want to proceed? [y|n]
Start to wait for user-input at Mon May 05 16:04:02 CDT 2014
Finish waiting for user-input at Mon May 05 16:04:06 CDT 2014
User Responded with: Y
Patch 14275572:

Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/cluvfyrac.sh" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'cluvfyrac.sh' to '/apps/oracle/product/db11gR2/bin/cluvfyrac.sh'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/crsdiag.pl" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'crsdiag.pl' to '/apps/oracle/product/db11gR2/bin/crsdiag.pl'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/gnsd" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'gnsd' to '/apps/oracle/product/db11gR2/bin/gnsd'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/lsnodes" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'lsnodes' to '/apps/oracle/product/db11gR2/bin/lsnodes'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/racgwrap" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'racgwrap' to '/apps/oracle/product/db11gR2/bin/racgwrap'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/racgwrap.sbs" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'racgwrap.sbs' to '/apps/oracle/product/db11gR2/bin/racgwrap.sbs'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/bin/srvconfig" does not exist.
'oracle.rdbms, 11.2.0.3.0': Cannot copy file from 'srvconfig' to '/apps/oracle/product/db11gR2/bin/srvconfig'
Copy Action: Source file "/apps/oracle/product/db11gR2/.patch_storage/14275572_Oct_12_2012_00_27_42/files/crs/install/rootofs.sh" does not exist.
OUI-67073:UtilSession failed: Prerequisite check "CheckRollbackable" on auto-rollback patches failed.
 Stack Description: java.lang.RuntimeException: Prerequisite check "CheckRollbackable" on auto-rollback patches failed.

CAUSE:- 

Before applying a patch, opatch takes a back up of the files (which are going to be modified by the patch) to the /.patch_storage/. These files are again restored when the particular patch is rolled back.

So here in this case the files from $ORACLE_HOME/.patch_storage/14275572_Oct_12_2012_00_27_42/files/ are missing. So opatch is not able to restore the files when rolling back the patch.
Work-Around:- 

Use the option "-no_sysmod" with opatch to rollback the patch.

"-no_sysmod": Specifies that the OPatch utility need not update the files in the system. It will only update the inventory
Syntax: 

opatch rollback -id -no_sysmod

Then I rolled back this patch manually from database home and tried psu again with opatch auto which is succeeded successfully. 

For example:

% opatch rollback -id 14275572 -no_sysmod 

(or) 

opatch rollback -id 14275572 -no_sysmod -invPtrLoc $ORACLE_HOME/oraInst.loc

Reference Documents:-

http://docs.oracle.com/cd/B14099_19/manage.1012/b16227/oui8_opatch.htm
Oracle Note :  751107.1
http://spicyoracle.blogspot.com/2010/01/opatch-prerequisite-check.html


No comments:

Post a Comment