Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label October Patch 2019. Show all posts
Showing posts with label October Patch 2019. Show all posts

Monday, October 28, 2019

Oracle CPU October 2019


Oracle Critical Patch Update on 18c - October 2019

Oracle Critical Patch Update (CPU)

Patch 30133246 - Combo of OJVM Component Release Update 18.8.0.0.191015 + Grid Infrastructure Oct 2019 Release Update 18.8.0.0.191015

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

Execute the following commands:

STEP 1

Oracle Database Patch 30116795 - GI Release Update 18.8.0.0.191015

1)
NOTE: IMPORTANT
GI Home:
You need to update first opatch to the higer or letest version.
You can download letest version from the following link.

Download lest OPatch from "https://updates.oracle.com/download/6880880.html"

Latest OPatch copy files
cd /oracle/app/home/product/18.0.0/grid_18
mv OPatch OPatch_old
cd /oracle/download/OPatch_latest/OPatch
cp -r OPatch /oracle/app/home/product/18.0.0/grid_18

You Need to do the same on ORACLE_HOME
Oracle ORACLE_HOME
Latest OPatch copy files
cd /oracle/app/home/product/18.0.0/dbhome_18
mv OPatch OPatch_old
cd /oracle/download/OPatch_latest/OPatch
cp -r OPatch /oracle/app/home/product/18.0.0/dbhome_18

Unzip patch file downloaded
p29699160_180000_Linux-x86-64.zip


Check the conflict:
From Grid_home
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30112122
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oracle/app/home/product/18.0.0/grid_18
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/home/product/18.0.0/grid_18/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.4.0
Log file location : /oracle/app/home/product/18.0.0/grid_18/cfgtoollogs/opatch/opatch2019-10-28_10-05-14AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

I am not going to add  output of the command. The output should looks like as above.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30113775
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30116128
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/28655963
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30093398

For Database home, as home user
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30112122
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /oracle/download/october_patch_2019/30133246/30116795/30113775


2)
Shut down all instances and listeners associated with the Oracle home that you are updating.
Stop a PDB from Oracle home:
alter pluggable database EMREP close immediate;
srvctl stop database -d EMCDB
srvctl status database -d EMCDB
Database is not running.

Stop Listener from GI Home
srvctl stop  listener -l LISTENER
srvctl status listener -l LISTENER
Listener LISTENER is enabled
Listener LISTENER is not running

Stop ASM
srvctl stop asm -f
srvctl status asm
ASM is not running.

3)
As root user execute the following command.
You have following options
 i) To patch only the GI Home
 <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/30116795 -  oh <GI_HOME>

ii) To patch oracle_home
  opatchauto apply <UNZIPPED_PATCH_LOCATION>/30116795 -oh <oracle_home1_path>

 iii) Patching Oracle Home and Grid Home togather:
 As root user, execute the following command on each node of the cluster:
 # <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/30116795

I am going to apply the path on both grid home and oracle home together.
NOTE: make sure that the Clusterware is running:
crsctl status has
If it is not running, you need to start it as follow.

crsctl start has

export PATH=$PATH:/oracle/app/home/product/18.0.0/grid_18/OPatch
# /oracle/app/home/product/18.0.0/grid_18/OPatch/opatchauto apply /oracle/download//october_patch_2019/30133246/30116795

Post-Installation Instructions
Single/Multitenant (CDB/PDB) DB
sqlplus / as sysdba
startup
alter pluggable database all open;
quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

Any databases that have invalid objects need to execute utlrp.sql run
For example:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

-- You can check valid or invalid objects with the following command.
col COMP_NAME format a35;

select COMP_NAME, version, status from dba_registry;

STEP 2
Patch 30133603 - Oracle JavaVM Component Release Update 18.8.0.0.191015
For a Non Oracle RAC environment, shut down all databases and listeners associated with the Oracle home that you are updating.

From Oracle_home
Normally no need to stop ASM. You need to just stop the DB and Listener
alter pluggable database EMREP close immediate;
srvctl stop database -d EMCDB
srvctl stop  listener -l LISTENER
export PATH=$PATH:/usr/ccs/bin
# /oracle/app/home/product/18.0.0/dbhome_18/OPatch/opatch apply /oracle/download/october_patch_2019/30133246/30133603

Postinstallation Steps

startup upgrade
alter pluggable database all open upgrade;
exit
cd $ORACLE_HOME/OPatch
./datapatch -verbose
sqlplus / as sysdba
shutdown
startup
alter pluggable database all open;

cd $ORACLE_HOME/rdbms/admin
SQL> @utlrp.sql

==== DONE ====

Verify the patch Version and Status of the patch:
col ID format a5
col COMMENTS format a20
col VERSION format a12
col BUNDLE format a5
col ACTION_TIME format a30
col ACTION format a10
set linesize 150
select substr(action_time,1,30) action_time, substr(id,1,8) id, substr(action,1,10) action, substr(version,1,8) version, substr(comments,1,20) comments from sys.registry$history ;

ACTION_TIME                    ID    ACTION     VERSION      COMMENTS
------------------------------ ----- ---------- ------------ --------------------
                                     BOOTSTRAP  18           RDBMS_18.8.0.0.0DBRU
19-SEP-19 05.11.28.728167 PM   0     jvmpsu.sql 18.3.0.0     RAN jvmpsu.sql
19-SEP-19 05.11.28.732176 PM   0     APPLY      18.3.0.0     OJVM RU post-install
30-SEP-19 04.32.02.042348 PM         RU_APPLY   18.0.0.0     Patch applied from 1
30-SEP-19 04.56.12.986458 PM   0     jvmpsu.sql 18.7.0.0     RAN jvmpsu.sql
30-SEP-19 04.56.12.996136 PM   0     ROLLBACK   18.7.0.0     OJVM RU post-deinsta
30-SEP-19 04.56.13.123924 PM   0     jvmpsu.sql 18.7.0.0     RAN jvmpsu.sql
30-SEP-19 04.56.13.128118 PM   0     APPLY      18.7.0.0     OJVM RU post-install
28-OCT-19 11.36.37.992819 AM         RU_APPLY   18.0.0.0     Patch applied from 1
28-OCT-19 12.02.55.080952 PM   0     jvmpsu.sql 18.8.0.0     RAN jvmpsu.sql
28-OCT-19 12.02.55.098936 PM   0     ROLLBACK   18.8.0.0     OJVM RU post-deinsta

ACTION_TIME                    ID    ACTION     VERSION      COMMENTS
------------------------------ ----- ---------- ------------ --------------------
28-OCT-19 12.02.55.234087 PM   0     jvmpsu.sql 18.8.0.0     RAN jvmpsu.sql
28-OCT-19 12.02.55.238332 PM   0     APPLY      18.8.0.0     OJVM RU post-install

13 rows selected.

set pagesize 20;
set linesize 200;
col ACTION_TIME format a30;
col DESCRIPTION format a50;
select PATCH_ID,ACTION,ACTION_TIME,DESCRIPTION,STATUS from registry$sqlpatch order by ACTION_TIME ;

select PATCH_ID,DESCRIPTION,STATUS from registry$sqlpatch order by ACTION_TIME ;
  PATCH_ID DESCRIPTION                                           STATUS
---------- ----------------------------------------------------- --------
  28090523 Database Release Update : 18.3.0.0.180717 (28090523)  SUCCESS
  27923415 OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)       SUCCESS
  29757256 Database Release Update : 18.7.0.0.190716 (29757256)  SUCCESS
  27923415 OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)       SUCCESS
  29774410 OJVM RELEASE UPDATE: 18.7.0.0.190716 (29774410)       SUCCESS
  30112122 Database Release Update : 18.8.0.0.191015 (30112122)  SUCCESS
  29774410 OJVM RELEASE UPDATE: 18.7.0.0.190716 (29774410)       SUCCESS

  30133603 OJVM RELEASE UPDATE: 18.8.0.0.191015 (30133603)       SUCCESS

Enjoy !

physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...