Jul – 2021 CPU Patching – Standalone Database Patching – 12c & 19c Database Patching

By mallik034vismobang05 Aug 20212 min read

Jul – 2021 CPU Patching – Standalone Database Patching – 12c & 19c Database Patching

Patch Information can be found using below MOS note:
Critical Patch Update (CPU) Program Jul 2021 Patch Availability Document (PAD) (Doc ID 2773670.1)

19c Patch:

Patch 32928749 – GI Jul 2021 Release Update 12.2.0.1.210720

12c Patch:

Patch 32928749 – GI Jul 2021 Release Update 12.2.0.1.210720

Oracle Home Patching (OPatch):

1) Shutdowns Database:
sqlplus / as sysdba 
shut immediate;
2) grant permision on patch directory:
chown -R oracle:oinstall /u01/patches/
3) As oracle user do prechks:
su – oracle
check OPatch version: 
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch version
List all applied pactehs:
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lspatches
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lsinv |grep applied
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lsinv |grep desc
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lspatches -oh /u01/app/oracle/product/12.2.0.1/dbhome_1
Conflict pre checks:
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/26022196/25869830 -oh /u01/app/oracle/product/12.2.0.1/dbhome_1
system space prechk:
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/26022196/25869830 -oh /u01/app/oracle/product/12.2.0.1/dbhome_1
4) Apply Patch:
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/12.2.0.1/dbhome_1 -silent -ocmrf /u01/patches/ocm.rsp /u01/patches/26022196/25869830
5) Post Verification:
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lspatches
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lsinv |grep applied
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lsinv |grep desc
/u01/app/oracle/product/12.2.0.1/dbhome_1/OPatch/opatch lspatches -oh /u01/app/oracle/product/12.2.0.1/dbhome_1
6) Start All Oracle Databases:
sqlplus / as sysdba 
startup;

Database Patching (datapatch):

1) Do database prechks
column comp_name format a40
column version format a12
column status format a15
select comp_name,version,status from dba_registry;
column owner format a15
column object_name format a40
column object_type format a20
select owner, object_name, object_type from dba_objects where status=’INVALID’ and owner like ‘%SYS%’ order by object_type,owner,object_name;
@?/rdbms/admin/utlprp.sql 16
2) Run the database post steps
cd $ORACLE_HOME/OPatch
./datapatch -verbose
3) Verify the database post steps
set pagesize 20;
set linesize 200;
col ACTION_TIME format a30;
col DESCRIPTION format a50;
select PATCH_ID,status from dba_registry_sqlpatch;
Regards,
Mallik
M
Mallikarjun Ramadurg

Oracle ACE Pro • Oracle SME & Founder of Vismo Technologies. Sharing practical Oracle DBA, RAC and Exadata knowledge.

Get the weekly Vismo digestNew Oracle articles and Q&A in your inbox. No spam.

One email a week. Unsubscribe any time.