Oracle Database 19c RAC Patching using Opatch Utility

Easy Step By Step Patching of Oracle 19c RAC using Opatch

[root@node1 u04]# rpm -ivh psmisc-22.20-16.el7.x86_64.rpm –nodeps –force

warning: psmisc-22.20-16.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY

Verifying… ################################# [100%]

Preparing… ################################# [100%]

Updating / installing…

1:psmisc-22.20-16.el7 ################################# [100%]

[root@node1 u04]# ssh node2

NOKEY

Verifying… ################################# [100%]

Preparing… ################################# [100%]

Updating / installing…

1:psmisc-22.20-16.el7 ################################# [100%]

Patch Location in Storage area:

/u01/app/19c/grid/.patch_storage/29401763_Apr_11_2019_22_26_25

——————————————————————————–

OPatch succeeded.

[oracle@node2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u04/p33509923/33239955

patches/ psmisc-22.20-16.el7.x86_64.rpm

[oracle@node2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u04/patches/33509923/33239955

Oracle Interim Patch Installer version 12.2.0.1.32

Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/19c/grid

Central Inventory : /u01/app/oraInventory

from : /u01/app/19c/grid/oraInst.loc

OPatch version : 12.2.0.1.32

OUI version : 12.2.0.7.0

Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2023-01-31_19-50-16PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

[oracle@node2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u04/patches/33509923/33529556

Oracle Interim Patch Installer version 12.2.0.1.32

Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/19c/grid

Central Inventory : /u01/app/oraInventory

from : /u01/app/19c/grid/oraInst.loc

OPatch version : 12.2.0.1.32

OUI version : 12.2.0.7.0

Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2023-01-31_19-51-00PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

[oracle@node2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u04/patches/33509923/33534448

Oracle Interim Patch Installer version 12.2.0.1.32

Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/19c/grid

Central Inventory : /u01/app/oraInventory

from : /u01/app/19c/grid/oraInst.loc

OPatch version : 12.2.0.1.32

OUI version : 12.2.0.7.0

Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2023-01-31_19-51-21PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

[oracle@node2 ~]$

[oracle@node2 ~]$

[oracle@node2 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u04/patches/33509923/33575402

Oracle Interim Patch Installer version 12.2.0.1.32

Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/19c/grid

Central Inventory : /u01/app/oraInventory

from : /u01/app/19c/grid/oraInst.loc

OPatch version : 12.2.0.1.32

OUI version : 12.2.0.7.0

Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2023-01-31_19-51-40PM_1.log

Invoking prereq “checkconflictagainstohwithdetail”

Prereq “checkConflictAgainstOHWithDetail” passed.

OPatch succeeded.

[oracle@node2 ~]$ cd /u01/app/19c/grid/bin/

[oracle@node2 bin]$ ./srvctl stop database -d racdb

[oracle@node2 bin]$

[oracle@node2 bin]$

[oracle@node2 bin]$ srvctl stop listener -l LISTENER

[oracle@node2 bin]$

[oracle@node2 bin]$

[oracle@node2 bin]$ su –

Password:

[root@node2 ~]# cd /u01/app/19c/grid/OPatch/

[root@node2 OPatch]# ./opatchauto apply /u04/patches/33509923 -oh /u01/app/19c/grid

OPatchauto session is initiated at Tue Jan 31 19:54:14 2023

System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2023-01-31_07-54-17PM.log.

Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2023-01-31_07-54-47PM.log

The id for this session is U6JW

Shared home /u01/app/19c/grid can only be patched in nonrolling mode.

OPATCHAUTO-72030: Execution mode invalid.

OPATCHAUTO-72030: Cannot execute in rolling mode, as CRS home is shared.

OPATCHAUTO-72030: Execute in non-rolling mode.

OPatchAuto failed.

OPatchauto session completed at Tue Jan 31 19:55:01 2023

Time taken to complete the session 0 minute, 47 seconds

opatchauto failed with error code 42

[root@node2 OPatch]# export CV_ASSUME_DISTID=OL7

[root@node2 OPatch]# ./opatchauto apply /u04/patches/33509923 -oh /u01/app/19c/grid

OPatchauto session is initiated at Tue Jan 31 19:55:48 2023

System initialization log file is /u01/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2023-01-31_07-55-51PM.log.

Session log file is /u01/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2023-01-31_07-56-21PM.log

The id for this session is 3M18

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/node2/crsconfig/crs_prepatch_apply_inplace_node2_2023-01-31_07-56-57PM.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

Performing postpatch operations on CRS – starting CRS service on home /u01/app/19c/grid

Postpatch operation log file location: /u01/app/oracle/crsdata/node2/crsconfig/crs_postpatch_apply_inplace_node2_2023-01-31_08-01-44PM.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:node2

CRS Home:/u01/app/19c/grid

Version:19.0.0.0.0

Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u04/patches/33509923/33239955

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_19-58-18PM_1.log

Patch: /u04/patches/33509923/33515361

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_19-58-18PM_1.log

Patch: /u04/patches/33509923/33529556

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_19-58-18PM_1.log

Patch: /u04/patches/33509923/33534448

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_19-58-18PM_1.log

Patch: /u04/patches/33509923/33575402

Log: /u01/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_19-58-18PM_1.log

OPatchauto session completed at Tue Jan 31 20:06:43 2023

Time taken to complete the session 10 minutes, 55 seconds

[root@node2 OPatch]# cd /u01/app/oracle/product/19c/db_1/OPatch/

[root@node2 OPatch]# ./opatchauto apply /u04/patches/33509923 -oh /u01/app/oracle/product/19c/db_1/

OPatchauto session is initiated at Tue Jan 31 20:07:41 2023

System initialization log file is /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchautodb/systemconfig2023-01-31_08-07-44PM.log.

Session log file is /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/opatchauto2023-01-31_08-08-21PM.log

The id for this session is 3PZY

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19c/db_1

Patch applicability verified successfully on home /u01/app/oracle/product/19c/db_1

Executing patch validation checks on home /u01/app/oracle/product/19c/db_1

Patch validation checks successfully completed on home /u01/app/oracle/product/19c/db_1

Verifying SQL patch applicability on home /u01/app/oracle/product/19c/db_1

SQL patch applicability verified successfully on home /u01/app/oracle/product/19c/db_1

Preparing to bring down database service on home /u01/app/oracle/product/19c/db_1

Successfully prepared home /u01/app/oracle/product/19c/db_1 to bring down database service

Bringing down database service on home /u01/app/oracle/product/19c/db_1

Following database(s) and/or service(s) are stopped and will be restarted later during the session: racdb

Database service successfully brought down on home /u01/app/oracle/product/19c/db_1

Performing prepatch operation on home /u01/app/oracle/product/19c/db_1

Prepatch operation completed successfully on home /u01/app/oracle/product/19c/db_1

Start applying binary patch on home /u01/app/oracle/product/19c/db_1

Binary patch applied successfully on home /u01/app/oracle/product/19c/db_1

Performing postpatch operation on home /u01/app/oracle/product/19c/db_1

Postpatch operation completed successfully on home /u01/app/oracle/product/19c/db_1

Starting database service on home /u01/app/oracle/product/19c/db_1

Database service successfully started on home /u01/app/oracle/product/19c/db_1

Preparing home /u01/app/oracle/product/19c/db_1 after database service restarted

No step execution required………

Trying to apply SQL patch on home /u01/app/oracle/product/19c/db_1

SQL patch applied successfully on home /u01/app/oracle/product/19c/db_1

OPatchAuto successful.

——————————–Summary——————————–

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

Host:node2

RAC Home:/u01/app/oracle/product/19c/db_1

Version:19.0.0.0.0

Summary:

==Following patches were SKIPPED:

Patch: /u04/patches/33509923/33534448

Reason: This patch is not applicable to this specified target type – “rac_database”

Patch: /u04/patches/33509923/33575402

Reason: This patch is not applicable to this specified target type – “rac_database”

Patch: /u04/patches/33509923/33239955

Reason: This patch is not applicable to this specified target type – “rac_database”

==Following patches were SUCCESSFULLY applied:

Patch: /u04/patches/33509923/33515361

Log: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_20-10-27PM_1.log

Patch: /u04/patches/33509923/33529556

Log: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-31_20-10-27PM_1.log

OPatchauto session completed at Tue Jan 31 20:29:16 2023

Time taken to complete the session 21 minutes, 35 seconds

—————–Restart the Server—————–

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Tue Jan 31 20:45:36 2023

Version 19.3.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

[oracle@node1 ~]$ ssh node2

[oracle@node2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Tue Jan 31 20:45:31 2023

Version 19.14.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.14.0.0.0

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.14.0.0.0

[oracle@node1 ~]$ sqlplus / as sysdba

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

———- —————————— ———- ———-

2 PDB$SEED READ ONLY NO

3 PRDPDB MOUNTED

4 WBPDB MOUNTED

SQL> alter session set container=prpdb;

ERROR:

ORA-65011: Pluggable database PRPDB does not exist.

SQL>

SQL> alter session set container=prdpdb;

Session altered.

SQL> alter

2 database open;

Database altered.

SQL> alter session set container=wbpdb;

Session altered.

SQL> alter database open;

Database altered.

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

———- —————————— ———- ———-

4 WBPDB READ WRITE YES

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

[oracle@node1 ~]$ !sql

sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Wed Feb 1 07:41:59 2023

Version 19.3.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

———- —————————— ———- ———-

2 PDB$SEED READ ONLY NO

3 PRDPDB READ WRITE YES

4 WBPDB READ WRITE YES

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.3.0.0.0

Database patch upda

[oracle@node1 ~]$ su –

Password:

[root@node1 ~]# cd /u01/app/oracle/product/19c/db_1/OPatch/

[root@node1 OPatch]# ./opatchauto apply /u04/patches/33509923 -oh /u01/app/oracle/product/19c/db_1/

OPatchauto session is initiated at Wed Feb 1 09:26:18 2023

System initialization log file is /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchautodb/systemconfig2023-02-01_09-26-21AM.log.

Session log file is /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/opatchauto2023-02-01_09-26-36AM.log

The id for this session is RW92

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19c/db_1

Patch applicability verified successfully on home /u01/app/oracle/product/19c/db_1

Executing patch validation checks on home /u01/app/oracle/product/19c/db_1

Patch validation checks successfully completed on home /u01/app/oracle/product/19c/db_1

Verifying SQL patch applicability on home /u01/app/oracle/product/19c/db_1

SQL patch applicability verified successfully on home /u01/app/oracle/product/19c/db_1

Preparing to bring down database service on home /u01/app/oracle/product/19c/db_1

Successfully prepared home /u01/app/oracle/product/19c/db_1 to bring down database service

Bringing down database service on home /u01/app/oracle/product/19c/db_1

Following database(s) and/or service(s) are stopped and will be restarted later during the session: racdb

Database service successfully brought down on home /u01/app/oracle/product/19c/db_1

Performing prepatch operation on home /u01/app/oracle/product/19c/db_1

Prepatch operation completed successfully on home /u01/app/oracle/product/19c/db_1

Start applying binary patch on home /u01/app/oracle/product/19c/db_1

Binary patch applied successfully on home /u01/app/oracle/product/19c/db_1

Performing postpatch operation on home /u01/app/oracle/product/19c/db_1

Postpatch operation completed successfully on home /u01/app/oracle/product/19c/db_1

Starting database service on home /u01/app/oracle/product/19c/db_1

Database service successfully started on home /u01/app/oracle/product/19c/db_1

Preparing home /u01/app/oracle/product/19c/db_1 after database service restarted

No step execution required………

Trying to apply SQL patch on home /u01/app/oracle/product/19c/db_1

SQL patch applied successfully on home /u01/app/oracle/product/19c/db_1

OPatchAuto successful.

——————————–Summary——————————–

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

Host:node1

RAC Home:/u01/app/oracle/product/19c/db_1

Version:19.0.0.0.0

Summary:

==Following patches were SKIPPED:

Patch: /u04/patches/33509923/33534448

Reason: This patch is not applicable to this specified target type – “rac_database”

Patch: /u04/patches/33509923/33575402

Reason: This patch is not applicable to this specified target type – “rac_database”

Patch: /u04/patches/33509923/33239955

Reason: This patch is not applicable to this specified target type – “rac_database”

==Following patches were SUCCESSFULLY applied:

Patch: /u04/patches/33509923/33515361

Log: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-02-01_09-29-01AM_1.log

Patch: /u04/patches/33509923/33529556

Log: /u01/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-02-01_09-29-01AM_1.log

OPatchauto session completed at Wed Feb 1 09:40:13 2023

Time taken to complete the session 13 minutes, 56 seconds

[root@node1 ~]# su – oracle

[oracle@node1 ~]$ sqlplus / as sysdba

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.14.0.0.0

[oracle@node1 ~]$ ssh node2

[oracle@node2 ~]$sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 – Production on Wed Feb 1 09:42:04 2023

Version 19.14.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production

Version 19.14.0.0.0

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

———- —————————— ———- ———-

2 PDB$SEED READ ONLY NO

3 PRDPDB MOUNTED

4 WBPDB MOUNTED

SQL> alter pluggable database all open;

Pluggable database altered.

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

———- —————————— ———- ———-

2 PDB$SEED READ ONLY NO

3 PRDPDB READ WRITE NO

4 WBPDB READ WRITE NO

Leave a Comment

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