Oracle CPU Jan
2020
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.
Oracle Critical Patch Update on 12c - January
2020
Oracle Critical Patch Update (CPU)
Patch 30463673 - Combo of OJVM Component
Release Update 12.2.0.1.200114 + Grid Infrastrusture Jan 2020 Release Update
12.2.0.1.200114
Execute the following commands:
STEP 1
Patch 30501932 - Database Grid Infrastructure Jan 2020
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 /u02/oracle/product/12.2.0.1/grid_12
mv OPatch OPatch_old
cd /download/OPatch_latest/OPatch
cp -r OPatch /u02/oracle/product/12.2.0.1/grid_12
You need to do
the same on ORACLE_HOME.
Oracle ORACLE_HOME.
Latest OPatch copy files
cd /u01/oracle/home/product/12.2.0.1/dbhome_12
mv OPatch OPatch_old
cd /download/OPatch_latest/OPatch
cp -r OPatch
/u01/oracle/home/product/12.2.0.1/dbhome_12
Unzip patch file downloaded
p30463609_190000_Linux-x86-64.zip
Check the conflict:
From Grid_home
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/30593149
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/30585969
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/30586063
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/26839277
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/26839277
For Database
home, as Oracle home user.
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/30593149
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir /download/JAN_patch_12c_2020/30463673/30501932/30585969
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 FASDBPRD close immediate;
srvctl stop
database -d KARDBPRD
srvctl
status database -d KARDBPRD
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>/ 30501932 - oh <GI_HOME>
ii) To patch oracle_home
opatchauto apply
<UNZIPPED_PATCH_LOCATION>/ 30501932 -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>/ 30501932
I am going to apply the path on both grid home and oracle home together.
NOTE: make sure that the Clusterware is running:
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:/u02/oracle/product/12.2.0.1/grid_12/OPatch
# /u02/oracle/product/12.2.0.1/grid_12/OPatch/opatchauto
apply / download/JAN_patch_12c_2020/30463673/30501932
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 30502018 - Oracle
JavaVM Component Release Update 12.2.0.1.200114
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 FASDBPRD close immediate;
srvctl stop
database -d KARDBPRD
srvctl
stop listener -l LISTENER
export
PATH=$PATH:/usr/ccs/bin
#
/u01/oracle/home/product/12.2.0.1/dbhome_12/OPatch/opatch apply /download/JAN_patch_12c_2020/30463673/30502018
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 ;
OR:
SQL> col DESCRIPTION format a50
SQL> col STATUS format a10;
SQL> select PATCH_ID,ACTION,ACTION_TIME,DESCRIPTION,STATUS
from registry$sqlpatch order by ACTION_TIME ;
PATCH_ID ACTION
ACTION_TIME
DESCRIPTION STATUS
---------- ---------------
------------------------------ --------------------------------------------------
----------
30133625 APPLY 15-JAN-20
03.47.40.077690 PM OJVM RELEASE UPDATE:
12.2.0.1.191015 (30133625) SUCCESS
30593149 APPLY 15-JAN-20
03.47.41.460110 PM DATABASE JAN 2020 RELEASE
UPDATE 12.2.0.1.200114 SUCCESS
30133625 ROLLBACK 15-JAN-20
04.01.32.526347 PM OJVM RELEASE UPDATE:
12.2.0.1.191015 (30133625) SUCCESS
30502018 APPLY 15-JAN-20
04.01.32.528868 PM OJVM RELEASE UPDATE
12.2.0.1.200114 SUCCESS
No comments:
Post a Comment