When applying a needed patch to the Grid Infrastructure Home for ASM or CRS the opatch utility may error out with the messages:
ApplySession failed: ApplySession failed to prepare the system. ApplySession was not able to create the patch_storage area: /oragrid/rdb_v112/.patch_storage/<patch#_date>
System intact, OPatch will not attempt to restore the system
OPatch failed with error code 73
These errors can be found in the opatch<date_time>.log file in grid_home/cfgtoollogs/opatch directory.
The reason for these messages are the permissions of the Grid Infrastructure Home.
The grid home needs to be unlocked before a patch can be applied.
The needed command to unlock the grid home is described in
Oracle® Grid Infrastructure Installation Guide
11g Release 2 (11.2) for Linux (or other platform)
Part Number E10812-03
Chapter 5.4 Modifying Oracle Clusterware Binaries After Installation
After installation, if you need to modify the Oracle Clusterware configuration, then you must unlock the Grid home. Please check this chapter for more detailed instructions.
The basic steps needed are:
Unzip the the patch file into a patch location on all nodes. This is becuase we will do a rolling patch by
stopping processes patching the homes and starting processes one node at a time using the -local flag.
1. Stop the CRS managed resources running from DB homes ( as the DB_HOME owner ) using
$DB_HOME/bin/srvctl stop home -o <DB_HOME> -s <status file location> -n
<node name>
note the status file is created by the process
2. As root user change directory to the path Grid_home/crs/install, where Grid_home is the path to the Grid home, and unlock the Grid home using the command rootcrs.pl -unlock -crshome Grid_home, where Grid_home is the path to your Grid infrastructure home. For example, with the grid home /u01/app/11.2.0/grid, enter the following command:
# cd /u01/app/11.2.0/grid/crs/install
# perl rootcrs.pl -unlock -crshome /u01/app/11.2.0/grid
3. change user to grid software owner and apply the patch according its readme
/u01/app/11.2.0/grid/OPatch/opatch napply -oh <CRS_HOME> -local <path to patch>
4. if requested in readme file of patch run the pre script for DB component of the patch using (As DB Home Privilige User)
patch location/custom/server/patch id/custom/scripts/prepatch.sh -dbhome <DB_HOME>
5. Apply the DB patch using (As DB Home Privilige User) (if needed and stated in readme file. This example is for a bundle patch containing a CRS portion and a RDBMS portion)
<DB_HOME>/OPatch/opatch napply -oh <DB_HOME> -local <path to bundle patch>/custom/server/<patch_id>
Note here the sub-directory of the patch.
6. . Run the post script for DB component of the patch using (As DB Home Privilige User) (if requested in readme file)
patch location/custom/server/patch id/custom/scripts/postpatch.sh -dbhome <DB_HOME>
7. Run the post script (As Root Privilege User)
# cd /u01/app/11.2.0/grid/crs/install
# perl rootcrs.pl -patch
8. Start the CRS managed resources that were earlier running from DB homes using
<DB_HOME>/bin/srvctl start home -o <DB_HOME> -s <status file location> -n <node name>
9. Repeat steps 1 through 8 on each cluster member node.
These are the general commands to apply a patch to grid home. Make sure to read the readme file of the patch You are going to apply as additional steps may be needed.
The rootcrs.pl script to unlock and patch grid home may not be mentioned in the particular readme.
From Oracle
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: [email protected]
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请