Professional Documents
Culture Documents
royfswonger
@royfswonger
mikedietrich
@mikedietrichde
https://mikedietrichde.com
dohdatabase
@dohdatabase
https://dohdatabase.com
rodrigoaraujorge
@rodrigojorgedba
https://dbarj.com.br/en
https://MikeDietrichDE.com/slides
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
MARKET
Oracle 11.2 WAIVED EXTENDED EXTENDED DRIVEN
MARKE
Oracle 12.1 EXTENDED T
DRIVEN
LIMITE
Oracle 12.2.0.1 D
Oracle 18
(12.2.0.2)
Oracle 19 EXTENDED
(12.2.0.3)
Oracle 21
Premier Support Waived Extended Support Paid Extended Support Market Driven Support Limited Error Correction
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
MARKET
11.2.0.4 DRIVEN
12.1.0.2 MDS
12.2.0.1
18c
Oracle 19
(12.2.0.3) EXTENDED
Oracle 21
EXTENDED
Oracle Database 23c Support
Innovation
Innovation
11 Copyright © 2023, Oracle and/or its affiliates Long Term Support Extended
Move production databases from one
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
1 2 3
Install Oracle Home Download and deploy Collect performance
including RU and MRP the most recent information from
AutoUpgrade current source and
MOS Note: 2118136.2 test thoroughly
MOS Note: 555.1 MOS Note: 2485457.1
MOS Note: 2781612.2
1000 971
874
800
721 718
654
603
600 573
533
502
472 474
398
400 334
294
228
200
0
19.3.0 19.4.0 19.5.0 19.6.0 19.7.0 19.8.0 19.9.0 19.10.0 19.11.0 19.12.0 19.13.0 19.14.0 19.15.0 19.16.0 19.17.0 19.18.0 19.19.0
Database 19 Release Updates and Revisions Bugs Fixed Lists (Doc ID 2523220.1)
19c 19.10.0 19.11.0 19.12.0 19.13.0 19.14.0 19.15.0 19.16.0 19.17.0 19.18.0 19.19.0 19.20.0 19.21.0 19.22.0 19.23.0 19.24.0
21c 21.3.0 21.4.0 21.5.0 21.6.0 21.7.0 21.8.0 21.9.0 21.10.0 21.11.0 21.12.0 21.13.0 21.14.0 21.15.0
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
19.18.0 19.18.0
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
19.19.0 19.19.0
2022 2023
October November December January February March April May June July August September October November
2022 2023
October November December January February March April May June July August September October November
Monthly Recommended Patches get sourced mostly from MOS Note 555.1
• Including ExaDB-C@C
• Patching News: RURs are gone – long live MRPs (Blog Post)
Fewer Bugs
Important patches are included.
Monitor for bugs that affects many customers.
Faster Patching
The bundle patch changes the way Data Pump
is patched. Subsequent patches apply faster.
125
fixes
Data Pump Bundle Patch for
19.19.0
Installing the Data Pump Bundle Patch when Data Pump is in use:
• Built-in 3-minute timeout before signaling an error
Note:
With the 19.14 (or later) Data Pump Bundle Patch installed you will see a much better error
message:
• ORA-39442: Data Pump software update in progress
57 Copyright © 2023, Oracle and/or its affiliates
Non-Binary Online Patching Safeguards
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
11.2.0.4 1. 2. 3.
12.2.0.1
12.1.0.2
18c
12.2.0.1
18c ONE BUTTON APPROACH 19c
21c
19c But giving you all the control you want
CONFIG FILE ANALYZE UPGRADE
Optionally,
convert to PDB
build.version 23.1.230224
build.date 2023/02/24 14:53:24 -0500
build.hash a1e2990e
build.hash_date 2023/02/24 14:44:39 -0500
build.supported_target_versions 12.2,18,19,21
build.type production
build.label (HEAD, tag: v23.1, origin/stable_devel, stable_devel)
1
Install Oracle Home
2 3
Create a simple Start AutoUpgrade
including Release Update configuration file in deploy mode
and additional patches
(MOS Doc ID 555.1)
patch1.source_home=/u01/app/oracle/product/19.0.0.0/dbhome_19_18_0
patch1.target_home=/u01/app/oracle/product/19.0.0.0/dbhome_19_19_0
patch1.sid=DB19
Hot clone
Refreshable clone
Patching RAC
Proactive fixups
Distributed upgrade
...
70 Copyright © 2023, Oracle and/or its affiliates
Patching
Out-of-place patching
support only right now
Further enhancements coming
soon
What's missing
Windows
RAC rolling
Data Guard standby-first
AutoUpgrade
Automate your patching process and
benefit from the familiar
AutoUpgrade
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
$ORACLE_HOME/OPatch
Applies binaries to an
opatch Oracle Home
All instances are down
DBMS_QOPATCH
SQL> select xmltransform(dbms_qopatch.get_opatch_lsinventory, dbms_qopatch.get_opatch_xslt) from dual;
Oracle Database 12.1 : FAQ on Queryable Patch Inventory (Doc ID 1530108.1)
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
Patching
as like
crossing
this street
STARTUP
SQL> SHUTDOWN
[oracle]$
[oracle]$ $ORACLE_HOME/OPatch/opatch
IMMEDIATE
$ORACLE_HOME/OPatch/datapatch apply
-verbose
[oracle]$
SQL> STARTUP
[oracle]$ $ORACLE_HOME/OPatch/opatch-verbose
$ORACLE_HOME/OPatch/datapatch apply
New or Cloned
Oracle Home
Home, 19.19.0
82 Copyright © 2023, Oracle and/or its affiliates
Twitter
Snapshot
standby
Oracle Home Redo Transport
19.18.0
RReed
dooT
Trraann
ssppoo
rrtt
New or Home
Oracle cloned Redo Transport
Oracle
19.19.0Home Primary
Standby
[oracle]$
DGMGRL>
[oracle]$convert database
switchover snapshot
$ORACLE_HOME/OPatch/opatch
$ORACLE_HOME/OPatch/datapatch
to PROD2; apply
PROD2 to physical standby;
-verbose
User
Connections
Instances
Oracle Homes $ $ORACLE_HOME/OPatch/opatchauto
Nodes
• Clone Oracle Home
• Patch Oracle Home
• Move to new Oracle Home
• Execute datapatch
Database
• Operating a cluster with different Oracle versions of either Grid Infrastructure and/or Database homes on each of the nodes
Standby-First installable
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
ALL NODE
• All nodes patched at one time
• One long database outage
• Works for all patches, including non-
rolling
• Cluster at full capacity except for
outage
Databa
se outa
ge
MINIMUM DOWNTIME
• Nodes patched in two batches
• One short database outage
• Works for all patches, including non-
rolling
• Other nodes must handle workload
while another batch is patched
Databa
se outa
ge
ROLLING
• Each node patched separately
• No database outage
• Patch must be RAC rolling installable
• Other nodes must handle workload
while one node is patched
No outa
ge
ROLLING IN GROUPS
• Patch a subset together
• Useful when draining is a problem
• No database outage
• Patch must be RAC rolling installable
• Other nodes must handle workload
while one node is patched
No outa
ge
DRAINING
FAN event
• Allows users to finish their work
and reconnect to another instance
• New sessions connect to other
Instan instances
ce
going do • Sessions that don't drain in time
wn
are forcefully terminated
• Controlled by drain_timeout
parameter in srvctl and
DBMS_SERVICE
ALTERNATIVE
• If draining is a problem
• Downtime limited to a switchover
• Test your Data Guard configuration
Switcho
SPtrainmdabryy ver Standby
Primary
In-place
1 Replaces existing Oracle Home
Uses opatchauto
Out-of-place
2 Creates a new Oracle Home
Uses opatchauto or gridSetup
• Minimize downtime
• Minimize risk during outage
• Easier rollback
Option 1 Option 2
TOGETHER SEPARATELY
OPatch
Patch Level
Application Continuity
Always use the latest version of OPatch
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
https://www.oracle.com/security-alerts/
Do I need to apply
this bundle?
How to evaluate the risk
6.0
5.3 5.3 5.3
5.0 4.8
4.3 4.3 4.3 4.3
4.0
3.5
3.1
3.0
2.0
1.0
0.0
5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 0 0 0 0 1 1 1 1 2 2 2 2 3 3
n -1 r-1
u l-1 t -1 n -1 r-1
u l-1 t -1 n -1 r-1
u l-1 t -1 n -1 r-1
u l-1 t -1 n -1 r-1
u l-1 t -1 n -2 r-2
u l-2 t -2 n -2 r-2
u l-2 t -2 n -2 r-2
u l-2 t -2 n -2 r-2
c c c c c c c c
Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap J O Ja Ap
Check | OJVM
• Is OJVM installed?
• Important note:
Disable OJVM with the Mitigation Patch in PDB$SEED to prevent new PDBs
being provisioned with an enabled OJVM – see Blog Post
136 Copyright © 2023, Oracle and/or its affiliates
OJVM Patching | Option 3
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
Solution
• Clean up available since opatch 37
opatch util deleteinactivepatches
• Total time taken: 19:22 min • Total time taken: 4:20 min
Update OPatch
2 Download from Oracle Support
1 2
Start database in new Oracle Complete patching with
Home datapatch
utlrp
shutdown immediate
utlrp
shutdown immediate
startup [open]
alter pluggable database all open
Potential concurrency
utlrp
shutdown immediate datapatch
startup [open]
Recompilation
Recompile manually
if more than 300 objects
utlrp
shutdown immediate datapatch utlrp
startup [open]
Recompilation only
if less than 300 invalid objects
$ORACLE_HOME/sqlpatch/sqlpatch
$ORACLE_HOME/sqlpatch/sqlpatch.pl
use strict;
use Getopt::Long;
use sqlpatch.pm
datapatch
1 Java patches
2 Bundle patches
3 One-off patches
Apply/rollback scripts:
$ORACLE_HOME/sqlpatch/.../nnn_apply.sql
$ORACLE_HOME/sqlpatch/.../nnn_rollback.sql
CDB
NODE 1
NODE 2
NODE 1
PDB1 PDB5
CDB$ROOT
PDB2 PDB6
NODE 2
PDB3 PDB7
PDB4 PDB8
$ cat RACCDB.cfg
upg1.source_home=/u01/app/oracle/product/19/dbhome_19_18
upg1.target_home=/u01/app/oracle/product/19/dbhome_19_19
upg1.sid=RACCDB
upg1.tune_setting=proactive_fixups=true,distributed_upgrade=true
$ cat RACCDB.cfg
upg1.source_home=/u01/app/oracle/product/19/dbhome_19_18
upg1.target_home=/u01/app/oracle/product/19/dbhome_19_19
upg1.sid=RACCDB
upg1.tune_setting=proactive_fixups=true,distributed_upgrade=true,active_nodes_limit=n
DV APS
Data Vault Analytical Workspace
XDK
Oracle XDK
Patching Basics
Patching Methods
Quarterly Patching
Patching Insights
Summary
• 300+ videos
• No marketing
• No buzzword
• All tech
Link
https://MikeDietrichDE.com
https://DOHdatabase.com
https://www.dbarj.com.br/en
Webinars:
https://MikeDietrichDE.com/videos
YouTube channel:
OracleDatabaseUpgradesandMigrations
From SR to Patch
Insights into the Oracle Database
Development Process
June 22, 2023 – 16:00 CEST