Applying latest JAN-22 RU 33583921 on Grid Infra – Standalone (GI) and Oracle Database Home (OH) 12.2

March 1, 2022
()

Applying latest JAN-22 RU 33583921 on Grid Infra-Standalone (GI) and Oracle Database Home (OH) 12.2

The GI Jan 2022 Release Update 12.2.0.1.220118 includes updates for both the Clusterware (GRID) home and database (RDBMS) home. In this blog we are going to apply Patch 33583921 – GI Jan 2022 Release Update 12.2.0.1.220118 on our Grid Infrastructure – Standalone 12.2 and Database Home 12.2. Click her to get Oracle Critical Database Patch ID for January 2022.


Below are the high-level steps we will follow to apply RU patch.

Step 1. Download requires Patches
Step 2. Save PDB State
Step 3. Copy patches to Server
Step 4. Update Grid Home Opatch Utility
Step 5. Update DB Home Opatch Utility
Step 6. GI & Oracle DB Prechecks
Step 7. Apply RU patch in both GI & DB with one command
Step 8. Patch Verification


Below are setup details and the same will be used in this demonstration.

Grid Home/u01/app/12.2/grid
Oracle DB Home/u01/app/oracle/product/12.2/db_1
Patch Software Location/u01/12c_patch
Non-CDB DB NameNONCDB
CDB DB NameORCL


Step 1. Download requires Patches: Download the latest OPatch utility Click here to download OPatch and RU 33583921 Click here to download RU patch.


Step 2. Save PDB State: Save your PDB status as OPEN. This step is very important otherwise during patching activity PDB will be in mount state and opatchauto apply command will not be able to load modified sql using datapatch command. And you need to run datapatch manually.

[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ ps -ef|grep pmon
grid      22169      1  0 Feb15 ?        00:00:57 asm_pmon_+ASM
oracle    23317  23267  0 16:36 pts/0    00:00:00 grep --color=auto pmon
oracle    39117      1  0 Feb16 ?        00:01:08 ora_pmon_noncdb
oracle    48543      1  0 Feb16 ?        00:01:07 ora_pmon_orcl
[oracle@test-machine03 ~]$ . oreanv
-bash: oreanv: No such file or directory
[oracle@test-machine03 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ sqlplus sys as sysdba
SQL*Plus: Release 12.0.0.0.0 - Production on Sun Feb 27 16:36:35 2022
Version 12.2.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.0.0.0.0 - Production
Version 12.2.0.0.0

SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      orcl
SQL>
SQL>
SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL>
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
SQL>
SQL> alter pluggable database ORCLPDB save state;

Pluggable database altered.

SQL> COLUMN con_name FORMAT A20
SQL> COLUMN instance_name FORMAT A20
SQL> SELECT con_name, instance_name, state FROM dba_pdb_saved_states;

CON_NAME             INSTANCE_NAME        STATE
-------------------- -------------------- --------------
ORCLPDB              orcl                 OPEN

SQL>


Step 3. Copy patches to Server: Copy downloaded patches to Server using WinSCP or as applicable.

[grid@test-machine03 12c_patch]$
[grid@test-machine03 12c_patch]$ pwd
/u01/12c_patch
[grid@test-machine03 12c_patch]$
[grid@test-machine03 12c_patch]$ ls -ltr
total 5139128
-rw-rw-r--. 1 grid oinstall    1478442 Jan 20 08:25 PatchSearch.xml
-rw-r--r--. 1  grid oinstall     2393137641 Feb 11 22:23 p33583921_122010_Linux-x86-64.zip
-rw-r--r--. 1  grid oinstall     122883929 Feb 11 22:59   p6880880_122010_Linux-x86-64.zip
drwxr-x---. 8 grid oinstall       4096 Feb 14 16:34 33583921
[grid@test-machine03 12c_patch]$


Step 4. Update Grid Home Opatch Utility: You need OPatch utility version 12.2.0.1.28 or later to apply this patch.

[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ /u01/app/12.2/grid/OPatch/opatch version
OPatch Version: 12.2.0.1.6

OPatch succeeded.
[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ cd /u01/app/12.2/grid
[grid@test-machine03 grid]$ mv OPatch/ OPatch_BKP
mv: cannot move âOPatch/â to âOPatch_BKPâ: Permission denied
[grid@test-machine03 grid]$ exit
logout
[root@test-machine03 ~]#
[root@test-machine03 ~]# cd /u01/app/12.2/grid
[root@test-machine03 grid]# mv OPatch OPatch_Old
[root@test-machine03 grid]#
[root@test-machine03 grid]# cd /u01/12c_patch
[root@test-machine03 12c_patch]# 
[root@test-machine03 12c_patch]# unzip -q p6880880_122010_Linux-x86-64.zip -d /u01/app/12.2/grid/
[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]# chown -R grid:oinstall /u01/app/12.2/grid/OPatch
[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]# /u01/app/12.2/grid/OPatch/opatch version
OPatch Version: 12.2.0.1.29

OPatch succeeded.
[root@test-machine03 12c_patch]#


Step 5. Update DB Home Opatch Utility: You need OPatch utility version 12.2.0.1.28 or later to apply this patch.

[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ cd /u01/app/oracle/product/12.2/db_1
[oracle@test-machine03 db_1]$
[oracle@test-machine03 db_1]$ mv OPatch/ OPatch_BKP
[oracle@test-machine03 db_1]$
[oracle@test-machine03 db_1]$
[oracle@test-machine03 db_1]$ cd /u01/12c_patch/
[oracle@test-machine03 12c_patch]$
[oracle@test-machine03 12c_patch]$ unzip -q p6880880_122010_Linux-x86-64.zip -d /u01/app/oracle/product/12.2/db_1/
[oracle@test-machine03 12c_patch]$
[oracle@test-machine03 12c_patch]$ /u01/app/oracle/product/12.2/db_1/OPatch/opatch version
OPatch Version: 12.2.0.1.29

OPatch succeeded.
[oracle@test-machine03 12c_patch]$


Step 6. GI & Oracle DB Prechecks: As RU Patch readme Patch number 33587128,33678030,33116894,26839277,33610989 are Grid Infra. patches and Patch number 33587128,33678030 are DB patches. So we need to run the below prechecks accordingly for Grid and DB.

[grid@test-machine03 ~]$
[grid@test-machine03 ~]$ cd /u01/12c_patch/
[grid@test-machine03 12c_patch]$
[grid@test-machine03 12c_patch]$ ls -l
total 5139128
drwxr-x---. 8 grid oinstall       4096 Feb 14 16:34 33583921
-rw-r--r--. 1 root root     2393137641 Feb 11 22:23 p33583921_122010_Linux-x86-64.zip
-rw-r--r--. 1 root root      122883929 Feb 11 22:59 p6880880_122010_Linux-x86-64.zip
-rw-rw-r--. 1 grid oinstall    1478442 Jan 20 08:25 PatchSearch.xml
[grid@test-machine03 12c_patch]$
[grid@test-machine03 12c_patch]$ cd 33583921
[grid@test-machine03 33583921]$
[grid@test-machine03 33583921]$ ls -l
total 144
drwxr-x---. 4 grid oinstall     48 Jan 15 09:16 26839277
drwxr-x---. 5 grid oinstall     62 Jan 15 09:16 33116894
drwxr-x---. 5 grid oinstall     81 Jan 15 09:20 33587128
drwxr-x---. 4 grid oinstall     48 Jan 15 09:16 33610989
drwxr-x---. 5 grid oinstall     62 Jan 15 09:15 33678030
drwxr-x---. 2 grid oinstall   4096 Jan 15 09:16 automation
-rw-rw-r--. 1 grid oinstall   5828 Jan 15 12:59 bundle.xml
-rw-r--r--. 1 grid oinstall    165 Feb 14 16:34 grid_list.txt
-rw-r--r--. 1 grid oinstall     66 Feb 14 16:34 oracle_list.txt
-rw-r--r--. 1 grid oinstall 124770 Jan 18 11:44 README.html
-rw-r--r--. 1 grid oinstall      0 Jan 15 09:16 README.txt
[grid@test-machine03 33583921]$


Patch Conflict Check


Grid Home:

[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ export ORACLE_HOME=/u01/app/12.2/grid
[grid@test-machine03 grid]$ export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
[grid@test-machine03 grid]$ which opatch
/u01/app/12.2/grid/OPatch/opatch
[grid@test-machine03 33583921]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33116894
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-30-34PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/26839277
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-31-19PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33610989
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-31-28PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[grid@test-machine03 grid]$ 
[grid@test-machine03 grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-31-37PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@test-machine03 grid]$
[grid@test-machine03 grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-31-44PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[grid@test-machine03 grid]$


DB Home:

[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.2/db_1
[oracle@test-machine03 ~]$ export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
[oracle@test-machine03 ~]$ which opatch
/u01/app/oracle/product/12.2/db_1/OPatch/opatch
[oracle@test-machine03 ~]$ 
[oracle@test-machine03 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatch/opatch2022-02-14_16-32-01PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@test-machine03 ~]$ 
[oracle@test-machine03 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/12c_patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatch/opatch2022-02-14_16-32-10PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@test-machine03 ~]$


System Space Check



Grid Home:

[grid@test-machine03 grid]$ cd /u01/12c_patch/33583921/
[grid@test-machine03 33583921]$
[grid@test-machine03 grid]$ vi grid_list.txt
/u01/12c_patch/33583921/33116894
/u01/12c_patch/33583921/26839277
/u01/12c_patch/33583921/33610989
/u01/12c_patch/33583921/33587128
/u01/12c_patch/33583921/33678030
:wq!
[grid@test-machine03 33583921]$
[grid@test-machine03 33583921]$
[grid@test-machine03 33583921]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /u01/12c_patch/33583921/grid_list.txt
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12.2/grid/cfgtoollogs/opatch/opatch2022-02-14_16-42-06PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[grid@test-machine03 33583921]$



DB Home:

[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ cd /u01/12c_patch/33583921/
[oracle@test-machine03 33583921]$
[oracle@test-machine03 33583921]$ vi oracle_list.txt
/u01/12c_patch/33583921/33587128
/u01/12c_patch/33583921/33678030
:wq!
[oracle@test-machine03 33583921]$
[oracle@test-machine03 33583921]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /u01/12c_patch/33583921/oracle_list.txt
Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2022, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatch/opatch2022-02-14_16-42-16PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@test-machine03 33583921]$


One-off Patch Conflict Detection

[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]# export ORACLE_HOME=/u01/app/12.2/grid
[root@test-machine03 12c_patch]# export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$PATH
[root@test-machine03 12c_patch]# which opatch
/u01/app/12.2/grid/OPatch/opatch

[root@test-machine03 12c_patch]# $ORACLE_HOME/OPatch/opatchauto apply /u01/12c_patch/33583921 -analyze

OPatchauto session is initiated at Mon Feb 14 16:47:46 2022

System initialization log file is /u01/app/12.2/grid/cfgtoollogs/opatchautodb/systemconfig2022-02-14_04-47-52PM.log.

Session log file is /u01/app/12.2/grid/cfgtoollogs/opatchauto/opatchauto2022-02-14_04-48-03PM.log
The id for this session is R61N

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/12.2/db_1


Executing patch validation checks on home /u01/app/oracle/product/12.2/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/12.2/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/12.2/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2/db_1


Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2/grid
Patch applicability verified successfully on home /u01/app/12.2/grid


Executing patch validation checks on home /u01/app/12.2/grid
Patch validation checks successfully completed on home /u01/app/12.2/grid

OPatchAuto successful.

--------------------------------Summary--------------------------------

Analysis for applying patches has completed successfully:

Host:test-machine03
SIDB Home:/u01/app/oracle/product/12.2/db_1
Version:12.2.0.1.0


==Following patches were SKIPPED:

Patch: /u01/19c_patch/33583921/33116894
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /u01/19c_patch/33583921/26839277
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /u01/19c_patch/33583921/33610989
Reason: This patch is not applicable to this specified target type - "oracle_database"


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /u01/19c_patch/33583921/33678030
Log: /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-48-18PM_1.log

Patch: /u01/19c_patch/33583921/33587128
Log: /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-48-18PM_1.log


Host:test-machine03
SIHA Home:/u01/app/12.2/grid
Version:12.2.0.1.0


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /u01/19c_patch/33583921/33678030
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-49-36PM_1.log

Patch: /u01/19c_patch/33583921/33116894
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-49-36PM_1.log

Patch: /u01/19c_patch/33583921/26839277
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-49-36PM_1.log

Patch: /u01/19c_patch/33583921/33610989
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-49-36PM_1.log

Patch: /u01/19c_patch/33583921/33587128
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-49-36PM_1.log



OPatchauto session completed at Mon Feb 14 16:49:42 2022
Time taken to complete the session 1 minute, 57 seconds
[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]#


Step 7. Apply RU patch in both GI & DB with one command : The Opatch utility has automated the patch application for the Oracle Grid Infrastructure (GI) home and the Database homes. The utility must be executed by an operating system (OS) user with root privilege. Use the below command to apply the patch to GI home and all Database homes of the same version. Please note no need to stop Cluster Services as opatchauto apply command will take care of it.

[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]# $ORACLE_HOME/OPatch/opatchauto apply /u01/12c_patch/33583921

OPatchauto session is initiated at Mon Feb 14 16:51:26 2022

System initialization log file is /u01/app/12.2/grid/cfgtoollogs/opatchautodb/systemconfig2022-02-14_04-51-28PM.log.

Session log file is /u01/app/12.2/grid/cfgtoollogs/opatchauto/opatchauto2022-02-14_04-51-33PM.log
The id for this session is 788C

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/12.2/db_1


Executing patch validation checks on home /u01/app/oracle/product/12.2/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/12.2/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/12.2/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2/db_1


Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2/grid
Patch applicability verified successfully on home /u01/app/12.2/grid


Executing patch validation checks on home /u01/app/12.2/grid
Patch validation checks successfully completed on home /u01/app/12.2/grid


Preparing to bring down database service on home /u01/app/oracle/product/12.2/db_1
Successfully prepared home /u01/app/oracle/product/12.2/db_1 to bring down database service


Bringing down database service on home /u01/app/oracle/product/12.2/db_1
Following database has been stopped and will be restarted later during the session: noncdb,orcl
Database service successfully brought down on home /u01/app/oracle/product/12.2/db_1


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/12.2/grid
Prepatch operation log file location: /u01/app/12.2/crsdata/test-machine03/crsconfig/hapatch_2022-02-14_04-53-24PM.log
CRS service brought down successfully on home /u01/app/12.2/grid


Start applying binary patch on home /u01/app/oracle/product/12.2/db_1
Binary patch applied successfully on home /u01/app/oracle/product/12.2/db_1


Start applying binary patch on home /u01/app/12.2/grid
Binary patch applied successfully on home /u01/app/12.2/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/12.2/grid
Postpatch operation log file location: /u01/app/12.2/crsdata/test-machine03/crsconfig/hapatch_2022-02-14_05-18-57PM.log
CRS service started successfully on home /u01/app/12.2/grid


Starting database service on home /u01/app/oracle/product/12.2/db_1
Database service successfully started on home /u01/app/oracle/product/12.2/db_1


Preparing home /u01/app/oracle/product/12.2/db_1 after database service restarted
No step execution required.........


Trying to apply SQL patch on home /u01/app/oracle/product/12.2/db_1
SQL patch applied successfully on home /u01/app/oracle/product/12.2/db_1

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:test-machine03
SIDB Home:/u01/app/oracle/product/12.2/db_1
Version:12.2.0.1.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/19c_patch/33583921/33116894
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /u01/19c_patch/33583921/26839277
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /u01/19c_patch/33583921/33610989
Reason: This patch is not applicable to this specified target type - "oracle_database"


==Following patches were SUCCESSFULLY applied:

Patch: /u01/19c_patch/33583921/33587128
Log: /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-54-25PM_1.log

Patch: /u01/19c_patch/33583921/33678030
Log: /u01/app/oracle/product/12.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_16-54-25PM_1.log


Host:test-machine03
SIHA Home:/u01/app/12.2/grid
Version:12.2.0.1.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/19c_patch/33583921/26839277
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_17-07-52PM_1.log

Patch: /u01/19c_patch/33583921/33116894
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_17-07-52PM_1.log

Patch: /u01/19c_patch/33583921/33587128
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_17-07-52PM_1.log

Patch: /u01/19c_patch/33583921/33610989
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_17-07-52PM_1.log

Patch: /u01/19c_patch/33583921/33678030
Log: /u01/app/12.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-02-14_17-07-52PM_1.log



OPatchauto session completed at Mon Feb 14 17:32:30 2022
Time taken to complete the session 41 minutes, 4 seconds
[root@test-machine03 12c_patch]#
[root@test-machine03 12c_patch]#


Step 8. Patch Verification: Use the below commands to verify the applied RU patches.

[root@test-machine03 12c_patch]# su - grid
Last login: Mon Feb 14 17:19:10 +03 2022
[grid@test-machine03 ~]$
[grid@test-machine03 ~]$ export ORACLE_HOME=/u01/app/12.2/grid
[grid@test-machine03 ~]$ export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
[grid@test-machine03 ~]$ opatch lspatches
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33610989;TOMCAT RELEASE UPDATE 12.2.0.1.0(ID:RELEASE) (33610989)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)
33116894;ACFS JUL 2021 RELEASE UPDATE 12.2.0.1.210720 (33116894)
26839277;DBWLM RELEASE UPDATE 12.2.0.1.0(ID:170913) (26839277)

OPatch succeeded.
[grid@test-machine03 ~]$

[oracle@test-machine03 ~]$
[oracle@test-machine03 ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.2/db_1
[oracle@test-machine03 ~]$ export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
[oracle@test-machine03 ~]$ opatch lspatches
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

OPatch succeeded.
[oracle@test-machine03 ~]$
[root@test-machine03 ~]#
[root@test-machine03 ~]# cd /u01/app/12.2/grid/bin
[root@test-machine03 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       test-machine03           STABLE
ora.FRA.dg
               ONLINE  ONLINE       test-machine03           STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       test-machine03           STABLE
ora.asm
               ONLINE  ONLINE       test-machine03           Started,STABLE
ora.ons
               OFFLINE OFFLINE      test-machine03           STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       test-machine03           STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       test-machine03           STABLE
ora.noncdb.db
      1        ONLINE  ONLINE       test-machine03           Open,HOME=/u01/app/o
                                                             racle/product/12.2/d
                                                             b_1,STABLE
ora.orcl.db
      1        ONLINE  ONLINE       test-machine03           Open,HOME=/u01/app/o
                                                             racle/product/12.2/d
                                                             b_1,STABLE
--------------------------------------------------------------------------------
[root@test-machine03 bin]#


CDB Databases

SQL>
SET LINESIZE 500
SET PAGESIZE 1000
SET SERVEROUT ON
SET LONG 2000000
COLUMN action_time FORMAT A12
COLUMN action FORMAT A10
COLUMN patch_type FORMAT A10
COLUMN description FORMAT A32
COLUMN status FORMAT A10
COLUMN version FORMAT A10

select CON_ID,
TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time,
PATCH_ID,
VERSION,
ACTION,
STATUS,
DESCRIPTION
from CDB_REGISTRY_SQLPATCH
order by CON_ID, action_time, patch_id;

    CON_ID ACTION_TIME    PATCH_ID VERSION    ACTION     STATUS     DESCRIPTION
---------- ------------ ---------- ---------- ---------- ---------- --------------------------------
         1 2022-02-14     33587128 12.2.0.1   APPLY      SUCCESS    DATABASE JAN 2022 RELEASE UPDATE
                                                                     12.2.0.1.220118

         3 2022-02-14     33587128 12.2.0.1   APPLY      SUCCESS    DATABASE JAN 2022 RELEASE UPDATE
                                                                     12.2.0.1.220118

SQL> alter session set container=ORCLPDB;

Session altered.


set lin 1000
col action form a12
col version  form a40
col description form a85
col action_date form a20
select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version from dba_registry_sqlpatch;

DESCRIPTION                                                                           ACTION       ACTION_DATE          VERSION
------------------------------------------------------------------------------------- ------------ -------------------- ----------------------------------------
DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118                                      APPLY        14/02/22 17:32:21

SQL>


NON-CDB Databases

SET LINESIZE 500
SET PAGESIZE 1000
SET SERVEROUT ON
SET LONG 2000000
COLUMN action_time FORMAT A12
COLUMN action FORMAT A10
COLUMN patch_type FORMAT A10
COLUMN description FORMAT A32
COLUMN status FORMAT A10
COLUMN version FORMAT A10

select
TO_CHAR(action_time, 'YYYY-MM-DD') AS action_time,
PATCH_ID,
VERSION,
ACTION,
STATUS,
DESCRIPTION
from DBA_REGISTRY_SQLPATCH
order by action_time, patch_id;

ACTION_TIME    PATCH_ID VERSION    ACTION     STATUS     DESCRIPTION
------------ ---------- ---------- ---------- ---------- --------------------------------
2022-02-14     33587128 12.2.0.1   APPLY      SUCCESS    DATABASE JAN 2022 RELEASE UPDATE
  


Reference :
Patch Readme:
https://updates.oracle.com/Orion/Services/download?type=readme&aru=24592637


This document is just for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to understand more about our pursuit.


Related Article


Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Hello and welcome to DBsGuru,I’m Jamsher Khan working as Senior Oracle DBA based in KSA-Jeddah, I have working experience in Oracle DBA, SQL Server, MySql, PostgreSQL, Linux, Golden Gate, ODA.Thanks for the visits!Share Learn Grow!

Leave a Reply

Your email address will not be published. Required fields are marked *