Applying Patches to Oracle Grid Infrastructure
Review these scenarios for applying patches to Oracle Grid Infrastructure in different stages of installation or upgrade.
For clusters that use FIPS 140.3, review Patching, Upgrading, and Downgrading Oracle Grid Infrastructure with FIPS 140.3 for the all-nodes fix requirement and rollback compatibility. For the rolling procedure to enable FIPS 140.3 after patching is complete, see Enabling FIPS 140.3 for Oracle Grid Infrastructure.
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.
- Download the Release Updates (RUs) you want to apply from My Oracle Support.
As the
griduser, 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.zipNote:
The new Oracle Grid Infrastructure home path must differ from the current Oracle Grid Infrastructure home path.
- Download and install the latest OPatch version in the new Oracle Grid Infrastructure home.
- Register the new Oracle Grid Infrastructure home in the central inventory.
./gridSetup.sh -setupHomeAs source_Grid_home -clusterNodes comma_separated_list_of_nodesThis step also performs a software-only installation in the new Grid home on all specified cluster nodes.
- 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
-switchGridHomeflag, 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.shThen perform the following steps:
- Select the Patch Oracle Grid Infrastructure option in the Configuration Option window.
- Select the Use Zero Downtime GI patching option.
- Select Skip updating ACFS drivers if the patch that you are installing contains operating system driver updates and you want to skip them.
- 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.
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.If patching fails, then perform the following rollback steps:
As the
rootuser, run the prepatch script.# /u01/app/23.7.0/grid/crs/install/rootcrs.sh -prepatch -dstcrshome Old_GI_Home -nodriverupdate -transparent -rollbackAs the
rootuser, run the postpatch script.# /u01/app/23.7.0/grid/crs/install/rootcrs.sh -postpatch -dstcrshome Old_GI_Home -nodriverupdate -transparent -rollback
If you want to switch back to the old Grid home after successfully switching to the new Grid home on all nodes:
As the
rootuser, unlock the old Grid home on all cluster nodes.# Old_GI_Home/crs/install/rootcrs.sh -unlock -crshome Old_GI_HomeAs the
griduser, runswitchGridHomefrom the old Grid home.$ Old_GI_Home/gridSetup.sh -silent -switchGridHome [-zeroDowntimeGIPatching [-skipDriverUpdate]]
Related Topics
- Zero-Downtime Grid Infrastucture Patching Using Oracle FPP
- Recommended Patch Maintenance for Oracle Real Application Clusters
Applying Patches During an Oracle Grid Infrastructure Installation or Upgrade
You can download and apply Release Updates (RUs) and one-off patches during an Oracle Grid Infrastructure installation or upgrade.
- Download the patches you want to apply from My Oracle Support:
- Select the Patches and Updates tab to locate the patch.
Oracle recommends that you select Recommended Patch Advisor, and enter the product group, release, and platform for your software.
- Move the patches to an accessible directory like
/tmp. Change to the Oracle Grid Infrastructure home directory:
$ cd /u01/app/23.0.0/gridApply Release Updates (RUs) and any one-off patches during the installation or upgrade process:
$ ./gridSetup.sh -applyRU /tmp/patch_ID -applyOneOffs /tmp/patch_IDNote:
You can apply RUs and one-off patches separately or together in the same command.
- Complete the remaining steps in the Oracle Grid Infrastructure configuration wizard to complete the installation or upgrade.
Applying Patches After an Oracle Grid Infrastructure Installation or Upgrade
You can apply patches to Oracle Grid Infrastructure deployment in rolling mode after a successful or a failed upgrade. This mode is similar to the "Rolling Upgrade" mode in terms of the Oracle ASM operations allowed in this quiesce state.
- Download patches you want to apply from My Oracle Support:
- Review the patch documentation for the patch you want to apply, and complete all required steps before starting the patch upgrade.
- Follow the instructions in the patch documentation to apply the patch on the first node.
# Grid_home/OPatch/opatchauto apply /tmp/patch_IDWait for the patching to finish on the first node before patching other cluster nodes.
Note:
The use of OPatch and OPatchAuto for out-of-place patching continues to be deprecated.
For patching in Oracle AI Database 26ai, Oracle recommends that you use out-of-place patching using Gold images to apply quarterly release updates (RUs). This deprecation does not affect in-place patching. If you want to perform in-place patching, then OPatch and OPatchAuto continue to be available for this purpose. The Oracle AI Database 26ai Free release is not supported for patching with RUs.
Apply the patch on all other cluster nodes, one at a time.
# Grid_home/OPatch/opatchauto apply patch_directory_location/patch_IDNote:
You can also use Oracle FPP Local Mode to automate the patching process.
Related Topics
Applying Patches when Oracle Clusterware Fails to Start
If the Oracle Clusterware stack does not start because of any error, then you can patch Oracle Grid Infrastructure using the OPatch utility.
- Download patches you want to apply from My Oracle Support:
Select the Patches and Updates tab to locate the patch.
Oracle recommends that you select Recommended Patch Advisor, and enter the product group, release, and platform for your software. My Oracle Support provides you with a list of the most recent Release Updates (RUs) and Release Update Revisions (RURs).
Place the patches in an accessible directory, such as
/tmp. - Review the patch documentation for the patch you want to apply, and complete all required steps before starting the patch upgrade.
As the
rootuser, stop the Oracle Clusterware stack on the first node.# $ORACLE_HOME/bin/crsctl stop crs -fUnlock the Oracle Grid Infrastructure home on the first node.
# $ORACLE_HOME/crs/install/rootcrs.sh -unlock- As the
griduser, follow the instructions in the patch documentation to apply the patch on the first node.$ $ORACLE_HOME/OPatch/opatch apply patch_directory_location/patch_IDWait for the patching to finish on the first node before patching other cluster nodes.
As the
rootuser, lock the Oracle Grid Infrastructure home on the first node.# $ORACLE_HOME/rdbms/install/rootadd_rdbms.sh # $ORACLE_HOME/crs/install/rootcrs.sh -lockUpdate Oracle Local Registry (OLR) to the patch level on the first node.
# $ORACLE_HOME/bin/clscfg -localpatchCheck if Oracle Clusterware is in the
ROLLING PATCHmode.$ 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 [0].If Oracle Clusterware is not in the
ROLLING PATCHmode, then set Oracle Clusterware inROLLING PATCHmode from a node where Oracle Clusterware is online.$ crsctl start rollingpatchStart the Oracle Clusterware stack on the first node.
# $ORACLE_HOME/bin/crsctl start crsUpdate Oracle Cluster Registry (OCR) to the patch level on the first node.
# $ORACLE_HOME/bin/clscfg -patch- Repeat steps 3 through 10 on all other cluster nodes.
You can patch all other cluster nodes in parallel.
Transition Oracle Clusterware out of the
ROLLING PATCHmode.$ crsctl stop rollingpatch