MOS Patching Best Practices
MOS Patching Best Practices
MOS Patching Best Practices
Practices
MOS
David Marshall
Principal Technical Support Engineer
Database Proactive Support
April 21, 2020
• Fixes a single bug: easy to verify if problem has been fixed, quickly available
• Released with full component level regression testing at Oracle
• Accessible by everyone with a support license
• Low risk of introducing breakages
• Vast majority can be installed with zero or minimal downtime
• Drawback:
– Easy availability leads to tendency to customize environments by combining interim
patches with other patches, causing supportability & maintainability problems
– Not fully tested outside the component or with other fixes
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. | 6
Types of Patches
Security Patch Update (SPU or CPU) for 11.2
• Cumulative Quarterly Patch to fix security vulnerabilities
• Extensively tested at Oracle
• Some fixes can be quite involved and may require post installation steps or
configuration changes
• Historically has been very low risk
• Drawbacks:
– Business wide coordination effort may need to be in place to manage fast roll-out.
– Because the SPU does not contain fixes for high impact non-security bugs
encountered by customers, a mission critical system will almost certainly need to
combine the SPU with one-offs, increasing overall risk.
– Not available from 12c forward
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. | 7
Types of Patches
Database Patch Set Update (DB PSU) for 11.2 or 12.1
• Cumulative Quarterly Patch to fix most recent high impact bugs
• Contains Security Content
• Extensively tested at Oracle
• Strict content inclusion criteria:
– No optimizer changes, must be RAC rolling installable, DG Standby First Installable,
fixes already tested by customers
– Low level volume of content
• Low risk
• Drawback:
– Strict content inclusion restrictions can sometimes lead to need to customize
environments with one-off patches as well.
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. | 8
Types of Patches
Grid Infrastructure Patch Set Update (GI PSU) for 11.2 or 12.1
Production Q2 Q3 Q4 Q1 Q2
19.1.0 19.2.0 Update
19.2.1 Revision #1
19.2.2 Revision #2
Production Q2 Q3 Q4 Q1 Q2
19.1.0 19.2.0 19.3.0 Update
19.2.1 19.3.1 Revision #1
Production Q2 Q3 Q4 Q1 Q2
19.1.0 19.2.0 19.3.0 19.4.0
19.2.1 19.3.1 19.4.1
19.2.2 19.3.2 19.4.2
Production Q1 Q2 Q3 Q4 Q5
19.1.0 19.2.0 19.3.0 19.4.0 19.5.0 19.6.0
19.2.1 19.3.1 19.4.1 19.5.1
19.2.2 19.3.2 19.4.2
Production Q1 Q2 Q3 Q4 Q5
19.1.0 19.2.0 19.3.0 19.4.0 19.5.0 19.6.0
19.2.1 19.3.1 19.4.1 19.5.1
19.2.2 19.3.2 19.4.2
• Can the patch be rolled back from the database without rolling back the
ORACLE_HOME? - Yes, but not easily
• Why not just run the rollback scripts?
1. The SQL being executed is the SQL that was installed by the patch
Therefore, nothing will be rolled back as the same SQL for the apply is being run for the rollback
2. The binaries being executed are the binaries that were installed by the patch
Therefore, the binaries being used when the db is reopened are the binaries that were installed by the
patch which means that the binaries have the code changes from the patch
• Overlay patch
– Create a new version of the patch
– Only the actual code that is in conflict is merged
– Installed on top of the existing patch
2 4
3
5
10
• A conflict resolution tool is available from the patch Search and Detail
screen
• Self Service tool that doesn’t require an SR to be logged
• Upload your OPatch inventory to resolve conflicts
• Resolution patches that are available are provided immediately
• Resolution requests are automatically filed if they do not exist
• Document 1091294.1 "How to use the My Oracle Support Conflict Checker Tool"
2 3
• Load Tests
– Check how the system or application behaves under production load.
– You may also want to simulate load beyond limits of normal operation for mission
critical systems.
– Key outcome is that availability should not be affected.
• Performance Tests
– Define key performance indicators to measure against for application flows. Examples
are responsiveness and throughput.
– Measuring against these, no material negative differences should be seen.
2. Check the OPatch version against the required version for the patch.
opatch prereq CheckMinimumOPatchVersion
• Don’t mix bundle patches and overlays (ordering issue). Should apply BP
first, then overlays. Will be fixed in a later OPatch release.
• In 12c, 18c, 19c, and beyond, datapatch takes care of applying the post
SQL
Connecting to database...OK
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...
Installing patches...
Patch installation complete. Total patches installed: 2