Applying Patches Using Zero-Downtime Oracle Grid Infrastructure Patching

Apply zero-downtime patches to Oracle Grid Infrastructure while keeping Oracle RAC database instances available.

Note:

Oracle recommends using Oracle Fleet Patching and Provisioning (Oracle FPP) Local Mode for patching Oracle Grid Infrastructure. For more information, see Patching Oracle Grid Infrastructure Using Oracle FPP Local Mode.
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 Release Updates (RUs) of the same release, for example, from Oracle Grid Infrastructure 23.3 to 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 version 19c or later. If your Oracle RAC or Oracle RAC One Node database is older than 19c, then the database instances stop during zero-downtime patching.
  1. Download the 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.7.0/grid
    $ chown grid:oinstall /u01/app/23.7.0/grid 
    $ cd /u01/app/23.7.0/grid 
    $ unzip -q download_location/grid.zip

    Note:

    The new Oracle Grid Infrastructure home path must differ from the current Oracle Grid Infrastructure home path.
  3. Download and install the latest OPatch version in the new Oracle Grid Infrastructure home.
  4. Register the new Oracle Grid Infrastructure home in the central inventory.
    ./gridSetup.sh -setupHomeAs source_Grid_home -clusterNodes comma_separated_list_of_nodes
    This step also performs a software-only installation in the new Grid home on all specified cluster nodes.
  5. Switch to the patched Oracle Grid Infrastructure home using one of the following methods:
    • Start the Oracle Grid Infrastructure installer in silent mode, with the -switchGridHome flag, from the patched home.
      $ /u01/app/23.7.0/grid/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]] 
      [-applyOneOffs comma_seperated_list_of_patch_directory_locations]
    • Start the Oracle Grid Infrastructure installer in interactive mode from the patched home.
      $ /u01/app/23.7.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.
      3. Select Skip updating ACFS drivers if the patch that you are installing contains operating system driver updates and you want to skip them.
      4. Enter the values required for your environment when prompted by the installation screens.
    All Oracle Grid Infrastructure services run from the new Grid home after patching completes.
  6. Verify that patching completed successfully.
    $ /u01/app/23.7.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.
  7. If patching fails, then perform the following rollback steps:
    1. As the root user, run the prepatch script.
      # /u01/app/23.7.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.7.0/grid/crs/install/rootcrs.sh -postpatch -dstcrshome Old_GI_Home 
      -nodriverupdate -transparent -rollback
  8. If you want to switch back to the old Grid home after successfully switching to the new Grid home on all nodes:
    1. As the root user, unlock the old Grid home on all 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]]