1. Upgrade to Oracle Database 19c
Release and Patching Strategy
Virtual Classroom Series
Mike Dietrich
Master Product Manager
Database Upgrade and Migrations
Roy Swonger
Vice President
Database Upgrade, Utilities and Patching
7. Don't do this | Outdated Versions
Monday, January 14, 2019 7:08 AM
I’m working into a deal in LAD Customer, migrating about aprox 70 db oracle database version 7 (supporting
OLD application developed on Oracle Forms) distributed around all country, my customer is want to
modernized their application to 3 layer architecture (using an J2EE app) and move all data to an oracle DB
central repository.
We are intend to recommend best architecture and sizing but we do not know Oracle 7 database.
11. Oracle 12.2 Release Family
Includes:
• Oracle 12.2.0.1, Oracle 18c (12.2.0.2), Oracle 19c (12.2.0.3)
• MOS Note:742060.1 - The Single Source of Truth
• MOS Note:161818.1 - Releases Support Status Summary
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
Oracle 18
(12.2.0.2)
EXTENDED
Oracle 12.2.0.1
Oracle 19
(12.2.0.3)
LIMITED
12. Lifetime Support Policy Brochure
http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
13. Innovation
EXTENDEDLong Term Support
Innovation
Premier Support Paid Extended Support
Release Types | Long Term Support vs Innovation Releases
Long Term Support Release
• 5 years of Premier Support followed by 3 years of Extended Support
Innovation Release
• 2 years of Premier Support, but there is no Extended Support
• MOS Note: 742060.1 - Release Schedule of Current Database Releases
24. Timeline | April 2018
Release April July October January April
18c 18.2.0 Beta - Update 1
25. Timeline | July 2018
Release April July October January April
18c 18.2.0 18.3.0
18.2.1
Update - On-Prem GA
1. Revision
26. Timeline | October 2018
Release April July October January April
18c 18.2.0 18.3.0 18.4.0
18.2.1 18.3.1
18.2.2
19c 19.1.0New Release
Update
1. Revision
2. Revision
27. Timeline Example | January 2019
Release April July October January April
18c 18.2.0 18.3.0 18.4.0 18.5.0
18.2.1 18.3.1 18.4.1
18.2.2 18.3.2
19c 19.1.0 19.2.0
28. Timeline Example | April 2019
Release April July October January April
18c 18.2.0 18.3.0 18.4.0 18.5.0 18.6.0
18.2.1 18.3.1 18.4.1 18.5.1
18.2.2 18.3.2 18.4.2
19c 19.1.0 19.2.0 19.3.0
29. Timeline Example | Future Projection 2022
April July October January April July October January April July October January April July October
18c 18.6.0 18.7.0 18.8.0 18.9.0 18.10.0 18.11.0 18.12.0 18.13.0 18.14.0 18.15.0
18.5.1 18.6.1 18.7.1 18.8.1 18.9.1 18.10.1 18.11.1 18.12.1 18.13.1 18.14.1
18.4.2 18.5.2 18.6.2 18.7.2 18.8.2 18.9.2 18.10.2 18.11.2 18.12.2 18.13.2
19c 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.3.1 19.4.1 19.5.1 19.6.1 19.7.1 19.8.1 19.9.1 19.10.1 19.11.1 19.12.1 19.13.1 19.14.1 19.15.1 19.16.1
19.3.2 19.4.2 19.5.2 19.6.2 19.7.2 19.8.2 19.9.1 19.10.2 19.11.2 19.12.2 19.13.3 19.14.2 19.15.2
2019
Patching
End 18c
2020 2021 2022
30. Timeline Example | Possibilities
April July October January April July October January April July October January April July October
19c 19.3.0 19.7.0 19.11.0 19.15.0 19.16.0 19.17.0
19.12.1
19.7.2 19.8.2 19.12.2 19.14.2
2019 2020 2021 2022
31. Timeline Example | Much simpler: RUs only
April July October January April July October January April July October January April July October
18c 18.6.0 18.7.0 18.8.0 18.9.0 18.10.0 18.11.0 18.12.0 18.13.0 18.14.0 18.15.0
19c 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
2019 2020 2021 2022
32. Attention | The RUR trap!
• You will consume RUs "secretly”
• Stay with RUs!
July October January April July October
RU 18.3.0
RUR-1 18.3.1
RUR-2 18.3.2 18.4.2 18.5.2 18.6.2
July October January April July October
RU 18.3.0
RUR-1 18.3.1
RUR-2 18.3.2 18.4.2 18.5.2 18.6.2
18.4.0 18.4.1
33. Attention | The RUR trap with example numbers
• Assume an RU has 100 new fixes - 25 security only, 75 other fixes
• Then an RUR1 adds 25 fixes on top, RUR2 adds another 25 on top
July October January April July October
RU 100
RUR-1 125
RUR-2 150 250 350 450
July October January April July October
RU 100 200 300 400 500 600
RUR-1 125
RUR-2 150 ? ?? ???
200 225
+100
36. Most Important Notes
MOS Note: 742060.1
Release Schedule of Current Database Releases
https://support.oracle.com/epmos/faces/DocumentDisplay?id=742060.1
MOS Note: 2285040.1
Release Update Introduction and FAQ
https://support.oracle.com/epmos/faces/DocumentDisplay?id=2285040.1
MOS Note: 756671.1
Master Note for Database Proactive Patch Program
https://support.oracle.com/epmos/faces/DocumentDisplay?id=756671.1
MOS Note: 1962125.1
Oracle Database - Overview of Database Patch Delivery Methods for 12.1.0.2 and lower
https://support.oracle.com/epmos/faces/DocumentDisplay?id=1962125.1
MOS Note 2337415.1
Oracle Database - Overview of Database Patch Delivery Methods for 12.2.0.1 and greater
https://support.oracle.com/epmos/faces/DocumentDisplay?id=2337415.1
MOS Note: 2118136.2
Assistant: Download Reference for Oracle Database/GI PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases
https://support.oracle.com/epmos/faces/DocumentDisplay?id=2118136.2
51. Basic Facts | opatch and datapatch
opatch
• Applies binary files to a home
• Instance will be down
• opatchauto for RAC environments
datapatch
• Applies SQL changes to a database
• Database must be up
52. Basic Facts | Patch types
One-Off patch - Interim patch
• Single bug fix
Merge patch
• Two or many one-off fixes combined
Bundle patch
• A collection of many fixes on top of a release or another bundle patch
• Examples:
• PSU - Patch Set Update
• BP - Bundle Patch
• RU - Release Update
Oracle Database - Overview
of Database Patch Delivery
Methods for 12.2.0.1 and later
MOS Note: 2337415.1
53. Basic Facts | Patch Inventory
$ opatch lsinventory
• Tells you what is installed in your software home
DBMS_QOPATCH package provides access to
• Patches installed in the Oracle Home
• FAQ on Queryable Patch Inventory (MOS Note: 1530108.1)
DBA_REGISTRY_SQLPATCH
• View detailing information about SQL patches installed in the database
54. Recommendation | Out-of-Place Patching
Apply Patches
Original
Database
Home
Cloned
Database
Home
Patched
Database
Home
Restart database
using new home
55. Recommendation | Standby-First Apply Patching
1. Patch the Standby
2. Test Changes!!!!
3. Switchover
Application Tier
Data Guard
• Production up after Switchover
• Run any patch SQL
• Patch original Primary home
Post Switchover
58. The Database Patching Process
1 Find the right patches
2 Download & install patches
3 Apply changes to the database
4 Verify the result
5 Special Feature: Install and Patch
59. Finding the Right Patches | Quarterly
https://www.oracle.com/security-alerts/
65. Recommendation | OJVM
If OJVM is installed, you have 3 options:
• Patch it quarterly
• Disable it with the mitigation patch
• Remove it from the database
66. Recommendation | OJVM
If OJVM is installed, you have 3 options:
• Patch it quarterly
• Separate from RUs and BPs
• Require downtime or blackout time for Java subsystem
• See MOS Note: 2217053.1
RAC Rolling Install Process for the "Oracle JavaVM Component Database PSU/RU"
• Disable it with the mitigation patch
• Remove it from the database
67. Recommendation | OJVM
If OJVM is installed, you have 3 options:
• Patch it quarterly
• Disable it with the mitigation patch
• For cases where patching the OJVM is not immediately possible
• Not RAC Rolling installable
• Must be disabled for database upgrade
• Explanation and download in MOS Note: 1929745.1
• Important:
https://mikedietrichde.com/2020/03/31/ojvm-and-the-mitigation-patch-things-to-know-in-2020/
• Remove it from the database
68. Recommendation | OJVM
If OJVM is installed, you have 3 options:
• Patch it quarterly
• Disable it with the mitigation patch
• Remove it from the database
• https://mikedietrichde.com/2017/08/07/javavm-xml -clean-oracle-database-11-2-12-2/
• Safe repair/reinstall of the JVM Component in 11.2 and up MOS Note: 2314363.1
• Repairing/Reinstalling JVM To A Multitenant Database (CDB and all PDBs) MOS Note: 2262919.1
69. New since Jan 2020 | JDK Update in RUs
JDK patches included in RUs
• Always stable JDK from the previous quarter
• April 2020 Release Update
• $ cd $ORACLE_HOME/jdk/bin
• $ ./java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
• https://www.oracle.com/technetwork/java/javase/8u241-relnotes-5813177.html
70. Recommendation | Find out more on the Upgrade Blog
Quarterly Patch Cycles JDK Information
71. The Database Patching Process
1 Find the right patches
2 Download & install patches
3 Apply changes to the database
4 Verify the result
5 Special Feature: Install and Patch
72. Download & Install Patches
Check for newest opatch version
Download and unzip patch (bundle)
Check for patch conflicts
Shutdown instance using this home
Apply binary with opatch or opatchauto
73. opatch
Always use the newest opatch
• Why should you use the most recent version of opatch:
https://mikedietrichde.com/2018/05/14/why-should-you-use-the-most-recent-version-of-opatch/
• MOS Note: 274526.1 – How To Download And Install The Latest OPatch(6880880) Version
1. Remove the existing $ORACLE_HOME/OPatch
2. Copy patch 6880880 into $ORACLE_HOME
3. Unzip it
76. Recommendation | OPatch
Download always the newest OPatch
• Opatch download via patch 6880880
Be aware of "opatch util cleanup"
• https://mikedietrichde.com/2020/04/17/opatch-alert-be-
aware-of-cleanup-issues-and-the-jdk-version/
77. The Database Patching Process
1 Find the right patches
2 Download & install patches
3 Apply changes to the database
4 Verify the result
5 Special Feature: Install and Patch
78. Apply changes to the Database
Startup the database in the new or patched home
• Start all pluggable databases
Patch the database using datapatch
• Since RU April 2019 increased parallelism for PDBs
Proactive recompilation of invalid objects
• Controlled by -recomp_threshold parameter
- Oracle 12.2.0.1 and higher since RU July 2019
- Bug 30485255 - Datapatch: Increase Automatic Revalidation Threshold To 300
80. Patching a Container Database
• datapatch simply "does the right thing"
• Only open PDBs will be patched
• Sequence
1. Patch the CDB$ROOT
2. Patch PDB$SEED and PDBs in parallel
• Since 12.2: Parallelism determined based on system and database characteristics
81. The Database Patching Process
1 Find the right patches
2 Download & install patches
3 Apply changes to the database
4 Verify the result
5 Special Feature: Install and Patch
82. Verify the Result
1 Check the logfiles
2 Test appropriately
3 Rollback or reapply if necessary
Automatically keeps zip of necessary files in database
(e.g. for unplug-plug into a CDB) since Oracle 18c
BLOB column: PATCH_DIRECTORY in CDB_REGISTRY_SQLPATCH
84. The Database Patching Process
1 Find the right patches
2 Download & install patches
3 Apply changes to the database
4 Verify the result
5 Special Feature: Install and Patch
85. Install and Patch
Since Oracle 18c, you can install and patch at the same time
• For GI and DB homes
• Grid Infrastructure example:
- mkdir /u01/app/grid/1970
- cd /u01/app/grid/1970
- unzip LINUX.X64_193000_grid_home.zip
- unzip p30899722_19000_Linux_x86-64.zip
- ./gridSetup -applyRU 30899722
• Database example:
- mkdir /u01/app/oracle/product/1970
- cd /u01/app/oracle/product/1970
- unzip LINUX.X64_193000_db_home.zip
- unzip -d p30869156_190000_Linux-x86-64.zip /u01/app/oracle/product/1970/patch
- ./runInstaller -applyRU patch/30899722
• Can include one-off patches as well
- ./runInstaller -applyRU patch/30899722 -applyOneOffs patch/30805684,patch/30524762
88. Summary | Tips for Patching Success
• Use out-of-place patching to reduce downtime and risk
• Standardize your environment and use gold images
• Automate where possible
• Stay current on quarterly Release Updates
• Run utlrp.sql before you invoke datapatch to clean up invalid objects
• Where applicable, use RAC Rolling patching and Standby-First Apply to further reduce downtime
91. Upcoming Webinars
Webinar 2:
Thursday, June 25 at 11:00h CET
AutoUpgrade to Oracle Database 19c
Webinar 3:
Tuesday, June 30 at 11:00h CET
Performance Stability, Tips and Tricks and Underscores
Webinar 4:
Thursday, July 2 at 11:00h CET
Migration to Oracle Multitenant