Grid Infrastructre Rolling Patch

 Grid Infrastructre Rolling Patch

OPatch:- The OPatch is java based utility and is used to apply and rolling back the interim patches. the utility is shipped with oracle installation.
It is always recommended to use the latest OPatch utility from MOS.
Note: The OPatch utility is not used to apply the patchsets. Before using OPatch utility, either you must set the ORACLE_HOME variable or use with -oh option for e.g.
$export ORACLE_HOME=/oracrs/app/11.2.0/grid
$opatch <command> <options>
or
$opatch <command> -oh /oracrs/app/11.2.0/grid

Take the help with opatch utility.
$opatch <command> -help

To check wether the patch is rolling (executed from patch directory).
$opatch query -all|grep -i Rolling
or
$opatch query -is_rolling_patch <patch_directory>

Prerequisties before patching with OPatch.
1.) Check the correct ORACLE_HOME variables exported.
2.) Backup the ORACLE_HOME directory.
3.) Download and placed the patch on each node (If cluster)
4.) Export the PATH variable ($export PATH=$PATH:$ORACLE_HOME/OPatch
Installing Rolling patch with OPatch Utility:-
The opatch utility can patch all the cluster nodes in one go, but this require the crs to be stopped on all the nodes. to avoid the complete outage,
the patch can be applied in rolling fashion to local node first and then move to next node and go on.
1.) Verify, the environment variables set properly.

2.) Stop the CRS on first node to be patched (as root)
    [root@rac01]#crsctl stop crs

3.) Unlock the protected files (as root)
    [root@rac01]#cd <patch_location>/custom/scripts
    [root@rac01]#./prerootpatch.sh -crshome /oracrs/app/11.2.0/grid -crsuser grid
   
4.) Save the configuration settings (as grid)
    [grid@rac01]$./prepatch.sh -crshome /oracrs/app/11.2.0/grid
    The command will save the settings in <grid_home>/install/params.crs
   
5.) Patch the CRS on first node (as grid)
    [grid@rac01]$opatch apply -local <patch_location> or $opatch apply -local <grid_home> <patch_location>
   
6.) Apply the configuration settings. (as grid)
    [grid@rac01]$<patch_location>/custom/scripts/postpatch.sh -crshome /oracrs/app/11.2.0/grid
   
7.) Restore the lock to the protected files (as root)
    [root@rac01]#<patch_location>/custom/scripts/postrootpatch.sh -crshome /oracrs/app/11.2.0/grid
   
8.) Verfiy the patch installed succesfully (as grid)
    [grid@rac01]$opatch lsinventory -detail

    If you are happy with the patched node, move to the next node patching. The next topic will be the OPatch automation... watch this blog. Thanks



No comments:

Post a Comment