apply the latest July 2019 Database Release Update Patch for Oracle 18c
Apply July 2019 Patch On Oracle 18c database
Oracle Critical Patch Update
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.
Patch
29699160 - Combo of OJVM Component Release Update 18.7.0.0.190716 + Grid
Infrastrusture Jul 2019 Release Update 18.7.0.0.190716
Execute the following commands:
STEP 1
Patch
29708703 - GI Release Update 18.7.0.0.190716
1)
NOTE:
IMPORTANT
GI Home:
You need to
update first opatch to the higher or latest version.
You can
download latest 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/july_patch_2019/29699160/29708703/29757256
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-09-30_12-43-24PM_1.log
Invoking
prereq "checkconflictagainstohwithdetail"
Prereq
"checkConflictAgainstOHWithDetail" passed.
OPatch
succeeded.
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782099
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782169
Check the conflict from DB home
echo $ORACLE_HOME
/oracle/app/home/product/18.0.0/dbhome_18
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29757256
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782099
2)
Shut down
all instances and listeners associated with the Oracle home that you are
updating
Stop a PDB:
alter pluggable database EMREP close immediate;
srvctl stop database -d EMCDB
-- stop listener from GI Home
srvctl stop
listener -l LISTENER
srvctl stop asm -f
srvctl status asm
ASM is not running.
3)
As root user execute the following command.
You have following options
To patch
only the GI Home
i) To patch only
the GI Home
<GI_HOME>/OPatch/opatchauto
apply <UNZIPPED_PATCH_LOCATION>/29708703 -oh <GI_HOME>
ii) To
patch oracle_home
opatchauto
apply <UNZIPPED_PATCH_LOCATION>/29708703 -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>/29708703
I am going to apply the path on both grid home and oracle home together
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/july_patch_2019/29699160/29708703
Patch 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
STEP 2
Patch 29774410 - Oracle JavaVM Component
Release Update 18.7.0.0.190716
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
export PATH=$PATH:/usr/ccs/bin
/oracle/app/home/product/18.0.0/dbhome_18/OPatch/opatch
apply /oracle/download/july_patch_2019/29699160/29774410
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
===
You can check the Patch version and
Installation status:
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.7.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
8 rows selected.
col BANNER format a40
col BANNER_FULL format a60
col DESCRIPTION format a70
set pagesize 300
SQL> select PATCH_ID, PATCH_UID, PATCH_TYPE,
STATUS, TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_UID PATCH_TYPE
STATUS TARGET_VERSION
---------- ---------- ----------
------------------------- ---------------
28090523 22329768 RU SUCCESS 18.3.0.0.0
27923415 22239273 INTERIM SUCCESS 18.1.0.0.0
29757256 22988612 RU SUCCESS 18.7.0.0.0
27923415 22239273 INTERIM SUCCESS 18.7.0.0.0
29774410 22958594 INTERIM SUCCESS 18.7.0.0.0
==== THAT'S IT ========
Patch
29699160 - Combo of OJVM Component Release Update 18.7.0.0.190716 + Grid
Infrastrusture Jul 2019 Release Update 18.7.0.0.190716
Execute the following commands:
STEP 1
Patch
29708703 - GI Release Update 18.7.0.0.190716
1)
NOTE:
IMPORTANT
GI Home:
You need to
update first opatch to the higher or latest version.
You can
download latest 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/july_patch_2019/29699160/29708703/29757256
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-09-30_12-43-24PM_1.log
Invoking
prereq "checkconflictagainstohwithdetail"
Prereq
"checkConflictAgainstOHWithDetail" passed.
OPatch
succeeded.
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782099
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782169
Check the conflict from DB home
echo $ORACLE_HOME
/oracle/app/home/product/18.0.0/dbhome_18
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29757256
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/oracle/download/july_patch_2019/29699160/29708703/29782099
2)
Shut down
all instances and listeners associated with the Oracle home that you are
updating
Stop a PDB:
alter pluggable database EMREP close immediate;
srvctl stop database -d EMCDB
-- stop listener from GI Home
srvctl stop
listener -l LISTENER
srvctl stop asm -f
srvctl status asm
ASM is not running.
3)
As root user execute the following command.
You have following options
To patch
only the GI Home
i) To patch only
the GI Home
<GI_HOME>/OPatch/opatchauto
apply <UNZIPPED_PATCH_LOCATION>/29708703 -oh <GI_HOME>
ii) To
patch oracle_home
opatchauto
apply <UNZIPPED_PATCH_LOCATION>/29708703 -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>/29708703
I am going to apply the path on both grid home and oracle home together
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/july_patch_2019/29699160/29708703
Patch 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
STEP 2
Patch 29774410 - Oracle JavaVM Component
Release Update 18.7.0.0.190716
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
export PATH=$PATH:/usr/ccs/bin
/oracle/app/home/product/18.0.0/dbhome_18/OPatch/opatch
apply /oracle/download/july_patch_2019/29699160/29774410
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
===
You can check the Patch version and
Installation status:
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.7.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
8 rows selected.
col BANNER format a40
col BANNER_FULL format a60
col DESCRIPTION format a70
set pagesize 300
SQL> select PATCH_ID, PATCH_UID, PATCH_TYPE,
STATUS, TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_UID PATCH_TYPE
STATUS TARGET_VERSION
---------- ---------- ----------
------------------------- ---------------
28090523 22329768 RU SUCCESS 18.3.0.0.0
27923415 22239273 INTERIM SUCCESS 18.1.0.0.0
29757256 22988612 RU SUCCESS 18.7.0.0.0
27923415 22239273 INTERIM SUCCESS 18.7.0.0.0
29774410 22958594 INTERIM SUCCESS 18.7.0.0.0
==== THAT'S IT ========
No comments:
Post a Comment