Applying Patches Using Zero-Downtime Oracle Grid Infrastructure Patching

Oracle Grid Infrastructure enables you to keep your Oracle RAC database instances running and accessible to the database users during Oracle Grid Infrastructure patching.

Use the switchGridHome command to switch from the current Oracle Grid Infrastructure home to the patched Oracle Grid Infrastructure home. You can use the switchGridHome command only to switch between different RUs of the same release, for example from Oracle Grid Infrastructure 23.3 to Oracle Grid Infrastructure 23.4.

Note:

You can use zero-downtime patching only for out-of-place patching of Oracle Grid Infrastructure with Oracle RAC or Oracle RAC One Node databases of 19c or later releases. If your Oracle RAC or Oracle RAC One Node database release is older than 19c, then the database instances stop during zero-downtime patching.
  1. Download the Oracle Database Release Updates (RUs) you want to apply from My Oracle Support.
  2. As the grid user, download the Oracle Grid Infrastructure image files and extract the files into a new Oracle Grid Infrastructure home directory.
    $ mkdir -p /u01/app/23.5.0/grid
    $ chown grid:oinstall /u01/app/23.5.0/grid 
    $ cd /u01/app/23.5.0/grid 
    $ unzip -q download_location/grid.zip

    Note:

    The new Oracle Grid Infrastructure home path must be different from the current Oracle Grid Infrastructure home path.
  3. Switch to the patched Oracle Grid Infrastructure home using either of the following methods:
    • Start the Oracle Grid Infrastructure installer in interactive mode from the patched home.
      $ /u01/app/23.5.0/grid/gridSetup.sh

      Then perform the following steps:

      1. Select the Patch Oracle Grid Infrastructure option in the Configuration Option window.
      2. Select the Use Zero Downtime GI patching option to switch to the patched Oracle Grid Infrastructure home.
      3. Select the Skip updating ACFS drivers option if the patch that you are installing contains operating system driver updates and you want to skip them.
      4. Respond to the installation screens with values appropriate for your environment.
    • Start the Oracle Grid Infrastructure installer in silent mode, with the -switchGridHome flag, from the patched home.
      $ /u01/app/23.5.0/grid/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]] 
      [-applyOneOffs comma_seperated_list_of_patch_directory_locations]
  4. Follow the steps in the configuration wizard to complete the Oracle Grid Infrastructure installation.
    All Oracle Grid Infrastructure services start running from the new Grid home after the patching is complete.
  5. Verify that the patching has completed.
    $ /u01/app/23.5.0/grid/crsctl query crs activeversion -f
    Oracle Clusterware active version on the cluster is [23.0.0.0.0]. The cluster upgrade state is [NORMAL]. 
    The cluster active patch level is 456789126.
  6. If the patching fails, then perform the following steps to rollback the patch:
    1. As the root user, run the prepatch script.
      # /u01/app/23.5.0/grid/crs/install/rootcrs.sh -prepatch -dstcrshome Old_GI_Home 
      -nodriverupdate -transparent -rollback
    2. As the root user, run the postpatch script.
      # /u01/app/23.5.0/grid/crs/install/rootcrs.sh -postpatch -dstcrshome Old_GI_Home 
      -nodriverupdate -transparent -rollback
  7. If you have successfully switched to the new Grid home on all nodes and want to switch back to the old Grid home, then perform the following steps:
    1. As the root user, unlock the old Grid home on all the cluster nodes.
      # Old_GI_Home/crs/install/rootcrs.sh -unlock -crshome Old_GI_Home
    2. As the grid user, run switchGridHome from the old Grid home.
      $ Old_GI_Home/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]]