Wednesday, June 24, 2009

Can You Delete $ORACLE_HOME/.patch_storage Directory

Is it necessary to keep the $ORACLE_HOME/.patch_storage directory after successful installation of a patch?

Yes, It is necessary to keep the $ORACLE_HOME/.patch_storage directory even after successful installation of a patch.

1) When you apply an interim patch to an Oracle home, OPatch stores the patch information in $ORACLE_HOME/.patch_storage directory. Inside this directory, there are separate directories created for each patch applied to the Oracle home. Interim patches are bug fixes that are made available to customers in response to specific bugs. CPU (Critical Patch Update) is also a kind of. The latest CPU will rollback the previously applied CPU as CPU is cumulative. So this rollback information is from the .patch_storage directory.

2) You may come across a bug conflict and might want to remove the conflicting patch. This process is known as patch rollback. During patch installation, OPatch saves copies of all the files that were replaced by the new patch before the new versions of these files are loaded and stores it in $ORACLE_HOME/.patch_storage/patch ID/. These saved files are called rollback files and are the key to making patch rollback possible.

3) Every time you apply a patch, you make changes to your inventory. Sometimes that change may corrupt the inventory. In Oracle RDBMS 10.2.0.X.X (Opatch 10.2.0.X.X) when you apply a patch, OPatch creates a snapshot of your inventory and stores it in $ORACLE_HOME/.patch_storage/ directory. The $ORACLE_HOME/.patch_storage//restore.sh script that comes with OPatch to remove any changes that were made to the inventory after the application of the patch. More over the .patch_storage directory is made hidden also adds to the fact that it should not be deleted.


No comments: