Search This Blog

Sunday, December 4, 2022

What is Oracle's Monthly recommended Patches and how to apply the MRP in RAC environment in rolling fashion ?




Oracle's Monthly Recommended Patches (MRP)

MRPs are a collection of one-off patches bundled together. Starting with update 19.17, Oracle will be providing these Monthly recommended patches for Linux x86-64 version. 

This MRPs will include to provide proactive patching between Release Updates and will include the fixes documented in "Oracle Database Important Recommended Patches" (My Oracle Support Doc ID 555.1), 

MRPs are cumulative patches and they don't  change the release number and they are deployed using Opatchauto and as of now , MRPs are available only on the Linux x86-64 platform.


Where to download the MRPs from?

we can download the Oracle monthly recommended patches from the note ((Doc ID 888.1))




From below, you can see that that MRPs are only available for Linux as of now.





Source Environment setup 
RAC Database : LABDBPR ( labdbpr1 and labdbpr2) 
GRID Home         : /u01/app/19.3.0.0/grid
RDBMS Home       : /u01/app/oracle/product/19.14.0.0/dbhome_1
Version                 : Oracle Database 19c EE - Production Version 19.16.0.0.0
hosts         : oraprim01 & oraprim02



Lets apply the first Monthly recommended patch for our 19c RAC database. 

1) Download the below MRP patch and unzip it in  '/u01/software' of both the nodes

p34737974_1917000DBRU_Linux-x86-64.zip








2) Check the readme of the patch for patch info.







3) Patch prequsites.













Our Opatch version is 12.2.1.33, so we do have the latest Opatch version installed already

4) Run the patch conflicts for the MRP  in all the nodes of the cluster























5) check the current RU patches applied to the oracle home.



6) Stop the oracle database running from the home to which we are going apply the MRP

Since this is a RAC database, lets stop the instance using srvctl command.

[oracle@oraprim01 software]$ srvctl status database -d labdbpr
Instance labdbpr1 is running on node oraprim01
Instance labdbpr2 is running on node oraprim02

[oracle@oraprim01 software]$ srvctl stop instance -d labdbpr -i labdbpr1

[oracle@oraprim01 software]$  srvctl status database -d labdbpr
Instance labdbpr1 is not running on node oraprim01
Instance labdbpr2 is running on node oraprim02
[oracle@oraprim01 software]$


7) Apply the patch on the first node, (prim01) where the database instance is currently down.

$ORACLE_HOME/OPatch/opatchauto apply -binary /u01/software/34737974  -oh $ORACLE_HOME -target_type oracle_database

























8) Start the instance on the node, prim01 and proceed with next step.

[oracle@oraprim01 34737974]$  srvctl status database -d labdbpr
Instance labdbpr1 is not running on node oraprim01
Instance labdbpr2 is running on node oraprim02
[oracle@oraprim01 34737974]$ srvctl start  instance -d labdbpr -i labdbpr1
[oracle@oraprim01 34737974]$  srvctl status database -d labdbpr
Instance labdbpr1 is running on node oraprim01
Instance labdbpr2 is running on node oraprim02
[oracle@oraprim01 34737974]$

9) Stop the 2nd instance of the database on node, prim02 and apply the patch on this node .

[oracle@oraprim02 34737974]$ srvctl status database -d labdbpr
Instance labdbpr1 is running on node oraprim01
Instance labdbpr2 is running on node oraprim02
[oracle@oraprim02 34737974]$ srvctl stop  instance -d labdbpr -i labdbpr2
[oracle@oraprim02 34737974]$ srvctl status database -d labdbpr
Instance labdbpr1 is running on node oraprim01
Instance labdbpr2 is not running on node oraprim02
[oracle@oraprim02 34737974]$

10) Apply the patch on the 2nd node (prim02) as shown below.

$ORACLE_HOME/OPatch/opatchauto apply -binary /u01/software/34737974  -oh $ORACLE_HOME -target_type oracle_database



























11) Start the instance on the node, prim02.

[oracle@oraprim02 34737974]$ srvctl start instance -d labdbpr -i labdbpr2
srvctl status database -d labdbpr
[oracle@oraprim02 34737974]$ srvctl status database -d labdbpr
Instance labdbpr1 is running on node oraprim01
Instance labdbpr2 is running on node oraprim02
[oracle@oraprim02 34737974]$
[oracle@oraprim02 34737974]$

12) Do we need 'datapatch' after applying the MRP patch?

Always read the README for any pre or post patch steps.

As per the README of the MRP patch, we dont have to run datapatch after the patch has been applied to the oracle database home. The reason for this is that MRP 19.17.0.0.221115 does not include any SQL changes and hence datapatch does not need to be run post installation. May be they will include the SQLs in the future MRPs and then we might need to run the datapatch.

13) How to check if the MRPs are applied or what MRPs are applied in the existing Oracle database home?

unfortunately, neither 'opatch lsinventory' or dba_registry gives any info on the MRPs' . lsinventory command gives the list of all the 

[oracle@oraprim01 34737974]$  $ORACLE_HOME/OPatch/opatch lsinv | grep 34737974
[oracle@oraprim01 34737974]$












If you check the lsinventory, it will give all the patches that have been applied with this MRP.





















May be Oracle will include the MRP patch info in the inventory in future releases or they provide a way to check to see if a specific MRP is applied or not.

Thanks for reading this post.

Thanks
Sambaiah Sammeta











No comments:

Post a Comment