Oracle 11g | Oracle 12c | Oracle 19c | Patching Procedures and Steps Overview | Happy New Year 2021!
Hi All,
STEP BY STEP APPLYING PSU IN ORACLE 11g DATABASE:
1-> We have to check the version of the OS i.e 32 or 64 bit
2-> Next we have to check the version of the database , we can use Opacth lsinventory
3-> Now check the patch advisory document to check whether patch is released or not
4-> Now download the patch and unzip the patch and check the prerequisites of the patch from oracle metalink (www.support.oracle.com)
5-> If the mentions as we have to install the patch using new OPatch version then we have to download latest Opatch version
6-> Now make sure you have taken the backup of you binaries and also take database backup
7-> Now count the number of invalid objects before applying the patch
8-> Make sure you down the listener if it is running from DB home and else not required
9-> Now Shutdown the databases and the apply the patch using Opatch apply
10-> Now start the database and then run the catbundle.sql script
Catbundle script contains list of applied patches on the database and it will the pick the patch information from catbundle_bundleseries.xml script
which is updated by Opatch, So running this script will updates the database catalog as which patch have been applied.
11-> After this run the utlrp.sql which is a mandatory script to be run validate database objects.
STEP BY STEP PATCHING in ORACLE 12c and 19C:
High Level steps for applying the Patch:
-> Check the OS version and database version and then look for the latest patch in the patch advisory tool
-> Check current version of Opatch Tool
-> Upgrade the Opatch utility
-> Take the backup of ORACLE_HOME
-> Shutdown the Database and Listener
-> Apply PSU patch on ORACLE_HOME
-> Execute Post installation Scripts (datapatch)
Here you just execute ./datapatch -verbose tool which is loated under Opatch utility which gathers information like whther patch installation requirement is met or not unlike catbundle just updates the DBA registry
-> Startup the Database and Listener
-> Check the dba_registry_sqlpatch .
STEP BY STEP PATCHING on Dataguard:
1-> check the OS and DB version
2-> Upgrade the Opatch utlity
3-> take the backup of the oracle home
4-> Now stop the shipping from primary to stand by using the command log_archive_dest_state_2 to "DEFER"
5-> Go to the stand by server and then stop the MRP (recover managed standby database cancel)
Note: PSU (Patch Set Update)/RU Release Update/Patch Set patches always needs to be applied first on the standby database and then on the primary database.
6-> Now shutdow the standby server and then listener also
7-> Apply the patch using Opatch apply
8-> After this start the listener and then database
9-> Now go to the primary database and note the invalid objects and then shutdown the database and listener
10-> Now apply the patch and then start the database and listener
11-> Now enable log shipping log_archive_dest_state_2=enable
12-> Now start the MRP at the stand by side
13-> Now on the primary run the catbundle.sql
STEP BY STEP PATCHING on GRID and ORACLE HOME :
1-> check the OS and DB version (In my case Oracle Linux 7.5 and Oracle 19c Database)
2-> Upgrade the Opatch utlity
3-> take the backup of the oracle homes (RDBMS & GRID)
4-> Apply the patch using Opatchauto
Note: OPatchauto automatically patch the typical Grid Infrastructure (GI) and RAC home directories with minimal intervention.to apply a patch using opatchauto,we need to run as a root user.
To apply a patch separately for both GRID and ORACLE_HOME in both nodes. /u01/app/19.3.0.0/grid/OPatch/opatchauto apply /u01/softwares/patch/31281355 -oh /u01/app/19.3.0.0/grid
5-> Check the DBA_REGISTRY_SQLPATCH :-
select BUNDLE_SERIES,PATCH_UID,PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTIONfrom dba_registry_sqlpatch;
./datapatch -vebose
Post a Comment: