Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

Patching Oracle Database 19C Grid Infrastructure on Standalone server for Patch_19.22 (p35940989)

Posted by Mir Sayeed Hassan on May 19th, 2024

Patching Oracle Database 19C Grid Infrastructure on Standalone server for Patch_19.22 (p35940989)

Check the status of Database

[oracle@stagdb1 ~]$ sqlplus / as sysdba

SQL> select instance_name, version, open_mode from V$database, v$instance;

INSTANCE_NAME    VERSION        OPEN_MODE
---------------- ---------------------------
DBSTAGE          19.0.0.0.0    READ WRITE

Prior to this apply the OPATCH on GRID

To Apply the Opatch at GRID & Database., Click on below link:

GRID OPATCH APPLY:

Download the Patch from below link

https://support.oracle.com/epmos/faces/PatchSearchResults?_adf.ctrl-state=ym4c1dobw_120&_afrLoop=189225645173189

Create a directory & place the downloaded Patch into it.

[oracle@stagdb1 ~]$ cd /u01/source/PATCH_19_22/
[oracle@stagdb1 PATCH_19_22]$ ls
GRID_PATCH_19.22
[oracle@stagdb1 PATCH_19_22]$ cd GRID_PATCH_19.22/
[oracle@stagdb1 GRID_PATCH_19.22]$ ls
p35940989_190000_Linux-x86-64.zip

Unzip GRID Patch

[oracle@stagdb1 DB_PATCH_19.12]$ unzip p35940989_190000_Linux-x86-64.zip
[oracle@stagdb1 GRID_PATCH_19.22]$ ls
35940989 p35940989_190000_Linux-x86-64.zip PatchSearch.xml
[oracle@stagdb1 GRID_PATCH_19.22]$ cd 35940989/
[oracle@stagdb1 35940989]$ ls
33575402 35943157 35956421 35967489 36115038 automation bundle.xml README.html README.txt

Note: Here you can see the sub-multiple are exist., You need to apply for each & every patch set as shown below:

To Apply the GRID Patch you need to shutdown the ASM Instance

Stop the ASM Instance

[oracle@stagdb1 ~]$ srvctl status asm
ASM is running on stagdb1

[oracle@stagdb1 ~]$ srvctl stop asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2974: unable to act on resource 'ora.asm' on server 'stagdb1' because that would require stopping or relocating resource 'ora.ARCH.dg' but the appropriate force flag was not specified

Note: The resolve the above error & stop the ASM., use the -f option into it.

[oracle@stagdb1 ~]$ srvctl stop asm -f
[oracle@stagdb1 ~]$ srvctl status asm
ASM is not running.

Therefore the ASM Instance is stop successfully.

Check teh Pre-requisite before apply the patch

[oracle@stagdb1 ~]$ cd /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/
[oracle@stagdb1 35940989]$ ls
33575402 35943157 35956421 35967489 36115038 automation bundle.xml README.html README.txt

Note: You need to check the Pre-requiste for all the individual sub-patches as below above.

[oracle@stagdb1 33575402]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2024, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/19c/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19c/db_1/oraInst.loc
OPatch version : 12.2.0.1.42
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-05-15_03-42-32AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Note: I have checked for all., all the pre-requites are OPatch Succeeded.

Start Applying the Patch on GRID Infrastructure

[oracle@stagdb1 ~]$ cd /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/
[oracle@stagdb1 35940989]$ ls
33575402 35943157 35956421 35967489 36115038 automation bundle.xml README.html README.txt

Here you need to apply the Individual SUB-PATCHES as shown below.

Apply 1st Sub-Patch

[root@stagdb1 35940989]# /u01/app/19c/grid/OPatch/opatchauto apply /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/33575402/ -oh /u01/app/19c/grid/

OPatchauto session is initiated at Wed May 15 03:45:20 2024
System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-05-15_03-45-28AM.log.
Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-05-15_03-45-37AM.log
The id for this session is IW5H
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19c/grid
Patch applicability verified successfully on home /u01/app/19c/grid

OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:

Host:stagdb1
SIHA Home:/u01/app/19c/grid
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/33575402
Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-05-15_03-45-48AM_1.log
Reason: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/33575402 is not required to be applied to oracle home /u01/app/19c/grid

OPatchauto session completed at Wed May 15 03:46:11 2024
Time taken to complete the session 0 minute, 51 seconds

Apply 2nd Sub-Patch

[root@stagdb1 35940989]# /u01/app/19c/grid/OPatch/opatchauto apply /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35943157/ -oh /u01/app/19c/grid/

OPatchauto session is initiated at Wed May 15 03:46:41 2024

System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-05-15_03-46-53AM.log.
Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-05-15_03-47-01AM.log
The id for this session is 75R2
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19c/grid
Patch applicability verified successfully on home /u01/app/19c/grid
Executing patch validation checks on home /u01/app/19c/grid
Patch validation checks successfully completed on home /u01/app/19c/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19c/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_03-48-56AM.log
CRS service brought down successfully on home /u01/app/19c/grid
Start applying binary patch on home /u01/app/19c/grid
Binary patch applied successfully on home /u01/app/19c/grid
Running rootadd_rdbms.sh on home /u01/app/19c/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/19c/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_03-58-06AM.log
CRS service started successfully on home /u01/app/19c/grid

OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:

Host:stagdb1
SIHA Home:/u01/app/19c/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35943157
Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-05-15_03-49-22AM_1.log

OPatchauto session completed at Wed May 15 03:59:37 2024
Time taken to complete the session 12 minutes, 45 seconds

Apply 3rd Sub-Patch

[root@stagdb1 35940989]# /u01/app/19c/grid/OPatch/opatchauto apply /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35956421/ -oh /u01/app/19c/grid/

OPatchauto session is initiated at Wed May 15 04:00:04 2024
System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-05-15_04-00-10AM.log.
Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-05-15_04-00-17AM.log
The id for this session is MAMI
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19c/grid
Patch applicability verified successfully on home /u01/app/19c/grid
Executing patch validation checks on home /u01/app/19c/grid
Patch validation checks successfully completed on home /u01/app/19c/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19c/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-02-19AM.log
CRS service brought down successfully on home /u01/app/19c/grid
Start applying binary patch on home /u01/app/19c/grid
Binary patch applied successfully on home /u01/app/19c/grid
Running rootadd_rdbms.sh on home /u01/app/19c/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/19c/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-05-20AM.log
CRS service started successfully on home /u01/app/19c/grid

OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:

Host:stagdb1
SIHA Home:/u01/app/19c/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35956421
Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-05-15_04-02-36AM_1.log

OPatchauto session completed at Wed May 15 04:06:43 2024
Time taken to complete the session 6 minutes, 40 seconds

Apply 4th Sub-Patch

[root@stagdb1 35940989]# /u01/app/19c/grid/OPatch/opatchauto apply /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35967489/ -oh /u01/app/19c/grid/

OPatchauto session is initiated at Wed May 15 04:07:09 2024
System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-05-15_04-07-15AM.log.
Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-05-15_04-07-22AM.log
The id for this session is VUCG
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19c/grid
Patch applicability verified successfully on home /u01/app/19c/grid
Executing patch validation checks on home /u01/app/19c/grid
Patch validation checks successfully completed on home /u01/app/19c/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19c/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-09-28AM.log
CRS service brought down successfully on home /u01/app/19c/grid
Start applying binary patch on home /u01/app/19c/grid
Binary patch applied successfully on home /u01/app/19c/grid
Running rootadd_rdbms.sh on home /u01/app/19c/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/19c/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-12-30AM.log
CRS service started successfully on home /u01/app/19c/grid

OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:

Host:stagdb1
SIHA Home:/u01/app/19c/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/35967489
Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-05-15_04-09-46AM_1.log

OPatchauto session completed at Wed May 15 04:13:52 2024
Time taken to complete the session 6 minutes, 44 seconds

Apply 5th Sub-Patch

[root@stagdb1 35940989]# /u01/app/19c/grid/OPatch/opatchauto apply /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/36115038/ -oh /u01/app/19c/grid/

OPatchauto session is initiated at Wed May 15 04:14:20 2024
System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-05-15_04-14-27AM.log.
Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-05-15_04-14-34AM.log
The id for this session is CPBA
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19c/grid
Patch applicability verified successfully on home /u01/app/19c/grid
Executing patch validation checks on home /u01/app/19c/grid
Patch validation checks successfully completed on home /u01/app/19c/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19c/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-16-38AM.log
CRS service brought down successfully on home /u01/app/19c/grid
Start applying binary patch on home /u01/app/19c/grid
Binary patch applied successfully on home /u01/app/19c/grid
Running rootadd_rdbms.sh on home /u01/app/19c/grid
Successfully executed rootadd_rdbms.sh on home /u01/app/19c/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19c/grid
Postpatch operation log file location: /u01/app/oracle/crsdata/stagdb1/crsconfig/hapatch_2024-05-15_04-19-13AM.log
CRS service started successfully on home /u01/app/19c/grid

OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:

Host:stagdb1
SIHA Home:/u01/app/19c/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/source/PATCH_19_22/GRID_PATCH_19.22/35940989/36115038
Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-05-15_04-16-55AM_1.log

OPatchauto session completed at Wed May 15 04:20:02 2024
Time taken to complete the session 5 minutes, 42 seconds

Therefore., applied all the sub-patches successfully.

START THE ASM INSTANCE & VERIFY

Start the ASM Instance

[oracle@stagdb1 ~]$ srvctl start asm

Check the Status of ASM Instance

[oracle@stagdb1 ~]$ srvctl status asm
ASM is not running.

Login to ASM Instance & Verify the ASM Disks

[oracle@stagdb1 ~]$ . oraenv
ORACLE_SID = [stagdb1] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@stagdb1 ~]$ asmcmd
ASMCMD> lsdg

State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name

MOUNTED   EXTERN   N 512 512 4096 4194304 153592 117664 0 117664 0 N ARCH/
MOUNTED EXTERN N 512 512 4096 4194304 2021368 298644 0 298644 0 N ORADATA/
MOUNTED EXTERN N 512 512 4096 4194304 10236 5860 0 5860 0 N REDO1/
MOUNTED EXTERN N 512 512 4096 4194304 10236 5860 0 5860 0 N REDO2/

Check the ASM Databas Instance

[oracle@stagdb1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Wed May 15 04:21:43 2024
Version 19.22.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0

SQL> select status from v$instance;

STATUS
------------
STARTED

Verified the GRID Patch applied.

[oracle@stagdb1 ~]$ echo $ORACLE_HOME
/u01/app/19c/grid
[oracle@stagdb1 ~]$cd /u01/app/19c/grid/OPatch

Check the applied list of patches

[oracle@stagdb1 OPatch]$ ./opatch lspatches

36115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)
35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
35956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)
35943157;Database Release Update : 19.22.0.0.240116 (35943157)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.

Verify with LSINVENTORY

[oracle@stagdb1 OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2024, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/19c/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/19c/grid/oraInst.loc
OPatch version : 12.2.0.1.42
OUI version : 12.2.0.7.0
Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2024-05-15_04-23-37AM_1.log

Lsinventory Output file location : /u01/app/19c/grid/cfgtoollogs/opatch/lsinv/lsinventory2024-05-15_04-23-37AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: stagdb1.sdb.local
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 19c 19.0.0.0.0
There are 1 products installed in this Oracle Home.
Interim patches (5) :

Patch 36115038 : applied on Wed May 15 04:19:00 IRST 2024
Unique Patch ID: 25495625
Patch description: "TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)"
Created on 19 Dec 2023, 08:44:34 hrs PST8PDT
Bugs fixed:
29286300, 30009095, 30729044, 30997459, 31657943, 32107716, 32248633
32625073, 33121445, 33655429, 33846688, 34300543, 34519419, 34816344
34970057, 35229376, 35538576, 35779899, 35926707, 36066696

Patch 35967489 : applied on Wed May 15 04:12:11 IRST 2024
Unique Patch ID: 25517119
Patch description: "OCW RELEASE UPDATE 19.22.0.0.0 (35967489)"
Created on 27 Dec 2023, 03:56:41 hrs PST8PDT
Bugs fixed:
13742922, 17787434, 23320062, 24611963, 24677421, 24943214, 25642320
25736599, 25738437, 26305045, 26496292, 26615554, 26615581, 26675491

-------------------------------------------------------------------------------

OPatch succeeded.

====Hence tested & verified in our test env====