In a previous episode, we covered how to patch Oracle Database Server out-of-place, but what if we need to patch Oracle Grid Infrastructure?
To learn how to do this, we will use an installation with Oracle Grid Infrastructure for a standalone server, also known as Oracle Restart, running RU 19.24 that we want to upgrade to RU 19.26.
Now, let’s see the procedure:
Initial configuration
We have a server called server, on which is installed Oracle Grid Infrastructure 19c in an Oracle Home called GIHome1 and Oracle Database Server 19c in an Oracle Home called DBHome1. Both support a single-instance database called orcl.
The OH of Oracle Grid Infrastructure has the following patches applied:
$ echo $ORACLE_HOME
/u01/app/grid/19.0.0/grid_1
36758186 | DBWLM RELEASE UPDATE 19.0.0.0.0 (36758186) |
36648174 | TOMCAT RELEASE UPDATE 19.0.0.0.0 (36648174) |
36590554 | ACFS RELEASE UPDATE 19.24.0.0.0 (36590554) |
36587798 | OCW RELEASE UPDATE 19.24.0.0.0 (36587798) |
36582781 | Database Release Update : 19.24.0.0.240716 (36582781) |
36538667 | JDK BUNDLE PATCH 19.0.0.0.240716 |
1
2
Creation of a new Oracle Home
We create a directory that will later be associated with the Oracle Home called GIHome2.
$ mkdir /u01/app/grid/19.0.0/grid_2
Oracle Grid Infrastructure installation
Unzip the Oracle Grid Infrastructure 19c base software in the newly created directory.
$ export GI_HOME=/u01/app/grid/19.0.0/grid_2
$ export STAGE=/stage
$ unzip -oq ${STAGE}/LINUX.X64_193000_grid_home.zip -d ${GI_HOME}
$ rm -rf ${GI_HOME}/OPatch
$ unzip -oq ${STAGE}/p6880880_190000_Linux-x86-64.zip -d ${GI_HOME}
After this, we have the Oracle Grid Infrastructure 19.3 binaries in the new directory.
3
4
Patch the new Oracle Home
The following patches will be applied:
37257886 | GI release update 19.26.0.0.0 |
37542054 | JDK bundle patch 19.0.0.0.250415 |
37769929 | GI MRP 19.26.0.0.250415 |
$ ${GI_HOME}/gridSetup.sh -silent -printtime -waitforcompletion \
-ignorePrereqFailure -lenientInstallMode \
ORACLE_HOME_NAME="GIHome2" -applyRU ${STAGE}/37257886 \
-applyOneOffs ${STAGE}/37542054 \
-responseFile ${DB_HOME}/install/response/gridsetup.rsp \
INVENTORY_LOCATION=/u01/app/oraInventory \
oracle.install.option=CRS_SWONLY \
ORACLE_BASE=/u01/app/oracle \
oracle.install.asm.OSDBA=asmdba \
oracle.install.asm.OSOPER=asmoper \
oracle.install.asm.OSASM=asmadmin
$ ${GI_HOME}/OPatch/opatchauto apply ${STAGE}/37769929 \
-binary -oh ${GI_HOME} -target_type cluster
After that, we have the Oracle Home GIHome2 containing the Oracle Grid Infrastructure 19.23 binaries.
Getting ready for the Oracle Home switch
As root user, check the version in use and the status of the services.
# echo ORACLE_HOME
/u01/app/grid/19.0.0/grid_1
# crsctl query has releasepatch
Oracle Clusterware release patch level is [467891468].
The release patch string is [19.24.0.0.0].
# crsctl stat res -t
----------------------------------------------------------
Name Target State Server State details
----------------------------------------------------------
Local Resources
----------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE server STABLE
ora.LISTENER.lsnr
ONLINE ONLINE server STABLE
ora.asm
ONLINE ONLINE server Started,STABLE
ora.ons
OFFLINE OFFLINE server STABLE
---------------------------------------------------------
Cluster Resources
---------------------------------------------------------
ora.cssd
1 ONLINE ONLINE server STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE server STABLE
ora.orcl.db
1 ONLINE ONLINE server Open,HOME=/u01/app/o
racle/19.0.0/db_1,ST
ABLE
---------------------------------------------------------
We proceed to execute prepatch from the current OH, referencing the new OH.
This step does not interrupt clusterware or database services.
# export GI_HOME_NEW=/u01/app/grid/19.0.0/grid_2
# ${ORACLE_HOME}/crs/install/roothas.sh -prepatch -dstcrshome ${GI_HOME_NEW}
Using configuration parameter file: /u01/app/grid/19.0.0/grid_1/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/server/crsconfig/hapatch_2025-04-30_12-55-48AM.log
2025/04/30 12:55:54 CLSRSC-347: Successfully unlock /u01/app/grid/19.0.0/grid_2
2025/04/30 12:55:54 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
5
6
Database service downtime
The database must be shut down before using the updated OH of Oracle Grid Infrastructure.
$ srvctl status database -db orcl
Database is running.
$ srvctl stop database -db orcl -stopmode immediate
$ srvctl status database -db orcl
Database is not running.
Clusterware upgrade
Always as root user, we proceed to execute postpatch from the current OH, referencing the new OH.
This will interrupt the clusterware services.
# export GI_HOME_NEW=/u01/app/grid/19.0.0/grid_2
# ${ORACLE_HOME}/crs/install/roothas.sh -postpatch -dstcrshome ${GI_HOME_NEW}
Using configuration parameter file: /u01/app/grid/19.0.0/grid_1/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/server/crsconfig/hapatch_2025-04-30_01-13-17PM.log
2025/04/30 13:13:59 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2025/04/30 13:14:49 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
We confirm that the version in use has been updated, verify the status of the services, and finally start up the database.
$ echo ORACLE_HOME
/u01/app/grid/19.0.0/grid_2
$ crsctl query has releasepatch
Oracle Clusterware release patch level is [2917480843].
The release patch string is [19.26.0.0.0].
$ crsctl stat res -t
----------------------------------------------------------
Name Target State Server State details
----------------------------------------------------------
Local Resources
----------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE server STABLE
ora.LISTENER.lsnr
ONLINE ONLINE server STABLE
ora.asm
ONLINE ONLINE server Started,STABLE
ora.ons
OFFLINE OFFLINE server STABLE
---------------------------------------------------------
Cluster Resources
---------------------------------------------------------
ora.cssd
1 ONLINE ONLINE server STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE server STABLE
ora.orcl.db
1 ONLINE ONLINE server Instance Shutdown,ST
ABLE
---------------------------------------------------------
$ echo $ORACLE_HOME
/u01/app/oracle/19.0.0/db_1
$ srvctl start database -db orcl
$ srvctl status database -db orcl
Database is running.
7
Conclusions
In very few minutes and with minimal service downtime, we have Oracle Grid Infrastructure running from GIHome2, patched with RU 19.26.
As you may have noticed, the database is still running Oracle Database Server 19.24, and although it is valid to have different versions of Oracle Grid Infrastructure and Oracle Database Server, it is recommended to upgrade it as well. We already detailed the procedure in an earlier article, so take a look at it if you haven’t done it yet.
In the next episode we will be looking at how to use out-of-place patching for Oracle Grid Infrastructure but now using Gold Image, so stay tuned!