RAC 19C PATCHING

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 24 May, 2022
  • 0 Comments
  • 3 Mins Read

RAC 19C PATCHING

RAC patch will be rolling patch. First stop all the services on node1 and apply the patch on node1. Once the node1 patch get completed then apply the patch on node2

winscp latest patch to /u01/patches and unzip and change opatch version on both GRID HOME and ORACLE HOME

[oracle@node1 ~]$ cd /u01/patches/
[oracle@node1 patches]$
[oracle@node1 patches]$
[oracle@node1 patches]$ ls -lrt
total 2682072
drwxr-x---. 15 grid oinstall       4096 Jan  9  2022 OPatch
drwxr-x---.  8 grid oinstall       4096 Jan 13  2022 33509923
-rw-rw-r--.  1 grid oinstall    1478442 Jan 20  2022 PatchSearch.xml
-rw-r--r--.  1 grid oinstall  122883929 Aug  8 20:25 p6880880_122010_Linux-x86-64.zip
-rw-r--r--.  1 grid oinstall 2622069290 Aug  8 20:28 p33509923_190000_Linux-x86-64.zip

Upgrade OPatch on both GRID HOME and ORACLE HOME

[grid@node1 patches]$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
[oracle@node1 patches]$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old

Check OPatch version after upgrade

[oracle@oraclelab1 patches]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch version
OPatch Version: 12.2.0.1.29

Prechecks

Check Patch Conflict

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33515361

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33529556

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33534448

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33239955

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/33509923/33575402

Stop clusterware services

$ORACLE_HOME/crs/install/rootcrs.sh -prepatch

Apply the patch on GRID HOME

$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33515361
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33529556
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33534448
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33239955
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33575402

Apply the patch on ORACLE_HOME

$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33515361
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local -silent /u01/patches/33509923/33529556

Start the clusterware services on Node 1

$ORACLE_HOME/crs/install/rootcrs.sh -postpatch

Repeat the Same steps on Node 2.

Apply the Database Patch

Database patching manual 

 

Database Patching:

==================

1) Do database prechks

@?/rdbms/admin/utlprp.sql 16

2) Run the database post steps


[oracle@node1 OPatch]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Aug 9 01:27:07 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 WRITE NO
3 PDBPRIM MOUNTED
4 PDBPRIM2 MOUNTED
SQL>
SQL>
SQL> alter pluggable database all open instances=all;

Pluggable database altered.

exit

cd $ORACLE_HOME/OPatch
nohup ./datapatch -verbose &

Recompile Invalid objects

[oracle@node1 rdbms]$ cd $ORACLE_HOME/rdbms/admin
[oracle@node1 admin]$
[oracle@node1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Aug 9 01:34:28 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> @utlrp.sql

3) Verify the database post steps

set pagesize 1000;
set linesize 1000;
col STATUS for a10;
col ACTION_TIME format a30;
col DESCRIPTION format a55;
select PATCH_ID,status,ACTION_TIME,DESCRIPTION from dba_registry_sqlpatch;

Here on node2 auto patch command is used so database patch is done automatically    

AutoPatch in RAC

$ORACLE_HOME/OPatch/opatchauto apply /u02/patches/33509923 -oh $ORACLE_HOME

/u01/app/oracle/product/19C/dbhome/OPatch/opatchauto apply /u02/patches/33509923 -oh /u01/app/oracle/product/19C/dbhome