Patching an 11gR2 Grid Infrastructure Home

May 3, 2010 / By Isabel Gratton

Tags: , ,

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 “11.2.0.1 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.

    1. 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
    1. As root, stop the CRS stack on the first node
# cd /u02/app/11.2.0/grid/bin
# ./crsctl stop crs
    1. 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
    1. 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
    1. Change the permissions back to “execute”
$ chmod u+x /u02/app/11.2.0/grid/opmn/bin/ons
    1. 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
    1. As oracle, check if the patch had been successfully applied
$ opatch lsinventory
    1. Check if the instance is back up, otherwise restart it manually
$ srvctl status database -d TEST
$ srvctl start instance -d TEST -i TEST1
  1. Repeat the steps above on each node

6 Responses to “Patching an 11gR2 Grid Infrastructure Home”

  • Maaz says:

    Isabel,

    Thanks for posting this informative example!

    I recently installed an 11gR2 Grid Infrastructure owned by ‘grid’, and a 10gR2 database owned by ‘oracle’, to found that switching between two users to be a bit cumbersome – obviously I’m not used to it.

    I had followed an example online to install and configure the RAC and it seemed to have worked out well.

    The next step was to apply a patch and after stumbling through it myself for a few hours, I ended up stopping CRS on each node to apply the patch. Initially, the ASM on the specific node would not stop because it was being used by CRS for the OCR and Voting disks but it seemed to work out rather well when I stopped CRS.

    Thanks again,
    Maaz

    • Allen says:

      Maaz, I noticed that you indicated that you had installed 11gR2 grid infrastructure and are running 10gR2 databsae under different owners. I am having a problem with a fresh install of both where the 10gR2 DB install doesn’t recognize the cluster (it never displays the page to select the nodes). If I run the 10gR2 DB install under the grid account that owns the clusterware, it DOES display the node selection screen.

      Was yours a fresh install of both 11gR2 clusterware and 10gR2 DB software? That is, you were not upgrading clusterware from 10g or earlier?

      Did you run into a similar problem that I described?

      I am stuck right now due to this problem. Any help would be appreciated.

      Thanks!

  • Isabel says:

    Nice to hear that!:)

  • [...] Patching an 11gR2 Grid Infrastructure Home Possibly related posts: (automatically generated)Oracle BooksOracle iAS DBAOracle Applications DBAFirst Step for RAC Learning. [...]

  • Santosh Pandya says:

    Is it possible to Upgrade the current version ie 10.2.0.4.0 PSU 10.2.0.4.1 to 11.2.0.1.2 PSU directly.

    Thanks,
    Santosh Pandya

  • Umesh says:

    Very Nice article, easy to follow.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>