Thursday, May 13, 2021

April – 2021 Patch Release Information and 19c Database Patching Steps

Patch Information and Download


Login to Oracle Support and search for April 2021 Patch Availability Document (PAD).

Critical Patch Update (CPU) Program Apr 2021 Patch Availability Document (PAD) (Doc ID 2749094.1)
 

Go to section 3 on the above document

- Patch Availability for Oracle Products

This section contains the following:

DB Home patching:
=================
1) Stop DB Home as root user
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1  /u01/app/oracle/product/19.0.0.0/dbhome_1/bin/srvctl stop home -o /u01/app/oracle/product/19.0.0.0/dbhome_1 -s /u01/patches/dbhome_1.state -n oraclerac1
 
--- If this is not RAC Oracle Home then stop individual DBs & Listener and proceed further

2) grant permision on patch directory as root user
chown -R oracle:oinstall /u01/patches/
 
3) As oracle user do prechks
su - oracle
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch version
 
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lsinv |grep applied
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lsinv |grep desc
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
 
Conflict pre checks:        
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/PSU/32545008/32545013 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patches/PSU/32545008/32579761 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
 
system space prechk:
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/PSU/32545008/32545013 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseDir /u01/patches/PSU/32545008/32579761 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
 
4) Apply Patch:
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -silent /u01/patches/PSU/32545008/32545013
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch apply -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -silent /u01/patches/PSU/32545008/32579761
 
5) Post verification
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lsinv |grep applied
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lsinv |grep desc
/u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch lspatches -oh /u01/app/oracle/product/19.0.0.0/dbhome_1
 
6) Start ORACLE_HOME as root user
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1  /u01/app/oracle/product/19.0.0.0/dbhome_1/bin/srvctl start home -o /u01/app/oracle/product/19.0.0.0/dbhome_1 -s /u01/patches/dbhome_1.state -n oraclerac1
 
 
Database Patching:
==================
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;
 
COLUMN NAME FORMAT A15
COLUMN RESTRICTED FORMAT A10
COLUMN OPEN_TIME FORMAT A30
SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;
 
set LINES 200
COLUMN action_time FORMAT A20
COLUMN action FORMAT A20
COLUMN namespace FORMAT A20
COLUMN version FORMAT A10
COLUMN comments FORMAT A30
COLUMN bundle_series FORMAT A10
select name,open_mode,database_role from gv$database;
select PATCH_ID, VERSION, ACTION, BUNDLE_ID, STATUS from dba_registry_sqlpatch order by ACTION_TIME;
select owner, object_name, object_type from dba_objects where status='INVALID' and owner like '%SYS%' order by object_type,owner,object_name;
select comp_id,comp_name,version,status from dba_registry;
select name, cause, type, message, status from pdb_plug_in_violations where type = 'ERROR' and status !='RESOLVED' order by name, time;
select INST_ID,CON_ID,NAME,RESTRICTED,OPEN_MODE from gV$CONTAINERS;
 
@?/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,BUNDLE_ID,BUNDLE_SERIES,status from dba_registry_sqlpatch;
 
 Similar to above steps...

 Similar to above steps...


Regards,
Mallik

2 comments:

  1. Embark on a rewarding nursing career within England's distinguished healthcare system. We seek passionate nurses with NMC registration and accredited qualifications to provide first-class patient care. Collaborate within dynamic, multidisciplinary teams, conducting detailed health assessments and creating personalized care plans. Successful applicants will exhibit strong communication skills and adaptability to diverse shift patterns. We offer competitive remuneration, comprehensive benefits, and various pathways for career advancement. Contribute to elevating healthcare standards and achieving outstanding patient outcomes. Join a forward-thinking workforce dedicated to healthcare excellence and innovation. Be part of a transformative journey in modern healthcare delivery.
    https://www.dynamichealthstaff.com/nursing-jobs-in-england

    ReplyDelete

Running SQL and O/S Commands Within RMAN

Running SQL and O/S Commands Within RMAN Sometimes you may want to run an SQL statement from within RMAN. Use RMAN’s sql command to do this....