GotoDBA Infrastructure Understanding Oracle Patching

Understanding Oracle Patching

Lately, I talked to several customers about Oracle patches, and each time it takes me quite a while to explain how it works.
So for all of you who don’t know about the different patching options (and what’s new in 12c), here is a short explanation about the topic.
Update (Feb 2016) – Oracle has recently changed the naming method for PSUs, please read my update here.
Update (Oct 2019) – I wrote a new post “all you need to know about Oracle database patching“. It refers to the new version concept and it’s more comprehensive, so I suggest reading it as well.

5-Number Versions

Oracle version number looks like this: 11.2.0.4.0 or 12.1.0.1.1. What are these numbers and what do they represent?

  • The first 3 numbers are the release number (or base release, or base version) which represents the version itself. For example: 10gR2 is 10.2.0, 11g is 11.1.0 and 12c is 12.1.0.
  • The 4th number is the patchset, which is a full patch of the software. Until 11.1, patchset was a package that we downloaded and installed on an existing Oracle Home. From 11.2 onwards, the patchset comes as a full installation into a new Oracle Home.
  • We will talk about the 5th number in a minute…

Patch Types

In Oracle there are quite a few different types of patches. Let’s review them quickly:

  • Patchset – as we saw above, it is a large and significant patch (the 4th number of the full version). The patchset is installed using the familiar Universal Installer.
  • One-off Patch – this is a small patch for fixing a single specific bug. The One-off patch is installed using opatch, a tool for patch installation which exists in every Oracle Home.
  • CPU (Critical Patch Update) or SPU (Security Patch Update) – this specific patch is released every quarter and includes security fixes. The CPU (SPU) is also installed using the opatch tool.
  • PSU (Patch Set Update) in UNIX/Linux or PB (Patch Bundle) in Windows – a package of One-off patches that was built to make the patching process easier and eliminate conflicts between different one-off patches. The last number of the full version (as I promised to explain) is the PSU or PB level. The PSU and PB are also installed using the opatch tool.
    Note that the PSU and PB are cumulative, meaning that PSU 11.2.0.3.8 includes all the fixes from 11.2.0.3.1 to 11.2.0.3.7. On top of that, they include all the CPU (or SPU) up to the PSU release date.

Behavior Changes

After upgrading and patching the database, we often run into different behavior changes or problems with the new version. So how does patching influence our database?

  • Patchset in this context is a bit risky. Patchsets rarely contain new features, but they might (bringing bugs with them sometimes). However, behavior changes of specific components (such as the optimizer) are more frequent, as well as changes in parameters’ default values, new parameters and other general changes that can influence how the database behaves.
  • All the other patches (PSU, PB, CPU, One-off patch) aren’t supposed to change the database behavior (unless a specific behavior itself was a bug and the fix changed it). The fixes here are bug specific; new features, new parameters and new default values should not be introduced.

What’s new?

11.2

As I wrote before, starting with 11.2 (for those of you who don’t know), the patchset is not an installation on top of an existing Oracle Home, but as a full installation package. If you needed to install 10.2.0.5, you installed 10.2.0.1 base release, then downloaded and installed 10.2.0.5 patchset to the same Oracle Home. To install 11.2.0.4, all we need to do is to download 11.2.0.4 installation from MOS (My Oracle Support, f.k.a. metalink) and install it into a new Oracle Home. There is still an option to install a patchset into an existing Oracle Home, but this is not that common.

12.1

Starting with 12.1, Oracle probably decided that there are too many patch types (and I guess they are right…), so they decided to cancel the CPU (SPU). From now on, the quarterly patch is the PSU and the PB and they will contain bug fixes including the quarterly security bug fixes.

Update (August 2017)

Oracle changed their versioning system starting with 12.2.0.2. You can read my post about it here.

MOS notes

To sum things up, here are several notes that explain what I just wrote:
Note 293369.1 – Explanation about opatch
Patch 6880880 – the patch number of the newest opatch per version
Note 1454618.1 – details on all database patches available
Note 756671.1 – recommended database patches per version
Note 854428.1 – PSU explanation
Note 1581950.1 – changes in CPU and PSU in 12.1
Hope you enjoyed,
Liron

Tags: ,

7 thoughts on “Understanding Oracle Patching”

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post