Let me show you how I patch Oracle Grid Infrastructure 19c (GI) using the in-place method and opatchauto.
My demo system:
- Is a 2-node RAC
- Runs Oracle Linux
- Is currently on 19.16.0, and I want to patch to 19.17.0
When I use this procedure, I patch both the GI home only. However, opatchauto has the option of patching the database home as well.
Preparation
I need to download:
- Latest OPatch from My Oracle Support (6880880).
- The 19.17.0 Release Update for Oracle Grid Infrastructure from My Oracle Support. I use patch 34416665.
You can use AutoUpgrade to easily download GI patches.
I place the software in /u01/software.
How to Patch Oracle Grid Infrastructure 19c
1. Make Ready For Patching
I can do this in advance. It doesn’t cause any downtime.
-
I update OPatch to the latest available version.
- On all nodes (copenhagen1 and copenhagen 2)
- In the GI home as grid
I just show how to do it for the GI home on one node
[grid@copenhagen1]$ cd $ORACLE_HOME [grid@copenhagen1]$ rm -rf OPatch [grid@copenhagen1]$ unzip -oq /u01/software/p6880880_190000_Linux-x86-64.zip -
I extract the patch file on both nodes. I show it for just the first node:
[grid@copenhagen1]$ cd /u01/software [grid@copenhagen1]$ mkdir 34416665 [grid@copenhagen1]$ mv p34416665_190000_Linux-x86-64.zip 34449117 [grid@copenhagen1]$ cd 34416665 [grid@copenhagen1]$ unzip p34416665_190000_Linux-x86-64.zip -
I check for patch conflicts.
- In the patch readme file I can find the details about which checks to make.
- I must check for conflicts in the GI home only.
- Since I have the same patches on all nodes, I can check for conflicts on just one of the nodes.
As grid with
ORACLE_HOMEset to the GI home:[grid@copenhagen1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/34416665/34416665/34419443 | grep checkConflictAgainstOHWithDetail [grid@copenhagen1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/34416665/34416665/34444834 | grep checkConflictAgainstOHWithDetail [grid@copenhagen1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/34416665/34416665/34428761 | grep checkConflictAgainstOHWithDetail [grid@copenhagen1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/34416665/34416665/34580338 | grep checkConflictAgainstOHWithDetail [grid@copenhagen1]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/34416665/34416665/33575402 | grep checkConflictAgainstOHWithDetail
2. Start Patching
Now, I start the actual patch process. I do this one node at a time.
-
First, as root on copenhagen1, I use
opatchautoto patch my GI home:[root@copenhagen1]$ export ORACLE_HOME=/u01/app/19.0.0.0/grid [root@copenhagen1]$ export PATH=$ORACLE_HOME/OPatch:$PATH [root@copenhagen1]$ $ORACLE_HOME/OPatch/opatchauto \ apply /u01/app/grid/patches/34416665/34416665 \ -oh $ORACLE_HOME- This step stops the entire GI stack, including the resources it manages (databases, listener, etc.). This means downtime on this node only. The remaining nodes stay up.
- In that period, GI marks the services as OFFLINE so users can connect to other nodes.
- Optionally, if I want a more graceful approach, I can manually stop the services, and perform draining.
opatchautoapplies the patches to the GI home.- In the end,
opatchautorestarts GI, including the managed resources (databases and the like). opatchautodoes not patch the database home.
-
I connect to the other node, copenhagen2, and repeat step 1.
- You must proceed as quickly as possible.
That’s it! I have now patched my Grid Infrastructure.
In my demo environment, each node was down for around 15 minutes. But the database remained up on other nodes all the time.
For simplicity, I have removed some of the prechecks. Please follow the patch readme file instructions and perform all the described prechecks.
Later on, I can patch my database.
Happy Patching!
Appendix
Installing Multiple Patches
In the example above, I am just installing one patch. Often, you need to install multiple patches, like Release Update, Monthly Recommend Patches (MRP), and perhaps also one-offs.
OPatchAuto can install multiple patches in one operation. You can use -phBaseDir to specify a directory where you place all the patches as subdirectories:
opatchauto apply -phBaseDir <directory> ...
Other Blog Posts in This Series
- Introduction
- How to Patch Oracle Grid Infrastructure 19c Using In-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place SwitchGridHome
- How to Patch Oracle RAC Database 19c Using Manual Out-Of-Place
- How to Patch Oracle Grid Infrastructure 19c and Oracle Data Guard Using Standby-First
- How to Patch Oracle Grid Infrastructure 19c Using Zero Downtime Oracle Grid Infrastructure Patching
- How to Patch Oracle Restart 19c and Oracle Database Using Out-Of-Place Switch Home
- How to Patch Oracle Restart 19c and Oracle Data Guard Using Out-Of-Place Switch Home
- Which Method Should I Choose When Patching Oracle Grid Infrastructure 19c
- How to Avoid Interruptions When You Patch Oracle Grid Infrastructure 19c
- Patching Oracle Grid Infrastructure And Oracle Data Guard
- How to Clone Oracle Grid Infrastructure Home Using Golden Images
- How to Roll Back Oracle Grid Infrastructure 19c Using SwitchGridHome
- How to Remove an Old Oracle Grid Infrastructure 19c Home
- Use Cluster Verification Utility (cluvfy) and Avoid Surprises
- A Word about Zero Downtime Oracle Grid Infrastructure Patching
- Why You Need to Use Oracle Fleet Patching and Provisioning
- My Best Advice on Patching Oracle Grid Infrastructure
- Pro Tips
