The process for applying a patch on top of the CRS, or now called, the Grid Infrastructure, has changed from what we used to do on 11gR1 and prior releases.
The patch I had recently applied was in order to resolve the Oracle bug “18.104.22.168 ONS CORE DUMP or High Resource Usage [ID 988795.1]”.
Database name: TEST
Instance Names: TEST1, TEST2
Grid Infrastructure Home: /u02/app/11.2.0/grid/bin (non-share home)
Grid Infrastructure Home Owner: oracle
Due to the fact that the patch doesn’t require full downtime and could be applied on a rolling basis, the plan below is to be executed on each node at time.
- Cleanly shutdown the first instance
$ export ORACLE_HOME=/u02/app/11.2.0/grid $ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/bin:$PATH $ srvctl stop instance -d TEST -i TEST1
- As root, stop the CRS stack on the first node
# cd /u02/app/11.2.0/grid/bin # ./crsctl stop crs
- Give “write” permission to the “ons” directory
$ chmod u+w /u02/app/11.2.0/grid/opmn/bin/ons
Here is where the change takes place, in 11gR1 and prior releases, in order to apply a one-off patch to the Clusterware after stopping the CRS stack, the next step was to use “opatch” and apply the patch. In 11gR2, in order to patch the Grid Infrastructure, you must first unlock the Grid Infrastructure home, patch it and then relock it again. If you are applying a different patch, you must take care to read its specific README file, because you may encounter times where you will have to relink the Oracle binaries as well.
The process to unlock the Grid Home is pretty simple. As root, execute the following perl script:
# cd /u02/app/11.2.0/grid/crs/install # perl rootcrs.pl -unlock -crshome /u02/app/11.2.0/grid
- Now as oracle, you can then use opatch in order to apply the patch
$ cd /oracle/distribs/9181300 $ export ORACLE_HOME=/u02/app/11.2.0/grid $ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH $ opatch apply -local -oh /u02/app/11.2.0/grid
- Change the permissions back to “execute”
$ chmod u+x /u02/app/11.2.0/grid/opmn/bin/ons
- Relock the Grid Home and restart the cluster by running the perl script below, as root
# cd /u02/app/11.2.0/grid/crs/install # perl rootcrs.pl -patch
- As oracle, check if the patch had been successfully applied
$ opatch lsinventory
- Check if the instance is back up, otherwise restart it manually
$ srvctl status database -d TEST $ srvctl start instance -d TEST -i TEST1
- Repeat the steps above on each node
Share this article
6 Responses to “Patching an 11gR2 Grid Infrastructure Home”
Leave a Reply