opatch versions

This blogpost is about oracle’s patching tool for the database and grid infrastructure: opatch. I personally have a love/hate relationship with opatch. In essence, opatch automates a lot of things that would be very error prone if it were to be done by hand, which is a good thing. However, there are a lot of things surrounding opatch that I despise. An example of that is the version numbering of opatch itself.

Versions and more versions

To jump into the matter directly: versions. I don’t understand why this has to be this complicated. I would even go as far as saying that somebody needs to step in and clean this up.

All opatch versions are identified by patch number 6880880. Anyone working with patching oracle probably knows this patch number by heart. You can go to this patch very quickly in MOS if you go to the search box which sits at the right side of the screen on the same height as the tabs, and type ‘patch 6880880’. A green rectangle will say ‘You have been directed to this PATCH based on an ID match’… So far the easy part.

On the right side below that, there is a rectangle, for which the first dropdown box is ‘release’. The release here means the release for which you want to download opatch. There are a great number of releases here:
– OPatch
– OPatch                           – EMCC
– OPatch
– OPatch for FMW 12c (OUI 13.9.x)   – Obsolete FMW(?)
– OUI NextGen 13.1                           – FMW
– OUI NextGen 13.2                           – FMW
– Oracle
– Oracle                                – Obsolete
– Oracle
– Oracle
– Oracle
– Oracle
– Oracle                             – Obsolete
– Oracle Database                – Obsolete

The red entries describe the patch being obsolete, and not downloadable. IMO, they should not be there.
The blue entries are non-database opatch releases. I would beg oracle to publish non-database opatch releases under their own patch number.

This eliminates 7 of the 14 choices. The left over entries show a list of versions that seems to make sense, these seem to show the database versions for which you can download a version of opatch. Let’s look at the patch descriptions of the leftover versions:

– OPatch    – Patch 6880880: OPatch for DB 12.2 releases (JUL 2018)
– OPatch    – Patch 6880880: OPatch for DB 18.x releases (JUL 2018)
– Oracle     – Patch 6880880: OPatch 9i, 10.1
– Oracle     – Patch 6880880: OPatch 10.2
– Oracle     – Patch 6880880: OPatch patch of version for Oracle software releases 11.1.0.x (OCT 2015)
– Oracle     – Patch 6880880: OPatch patch of version for Oracle software releases 11.2.0.x and 18.x (APR 2018)
– Oracle     – Patch 6880880: OPatch for DB 12.x and 18.x releases (JUL 2018)

If we follow the versions from the lowest to the highest versions of Opatch:
–     -> ‘OPatch 9i, 10.1’ This is opatch for database versions 9i and 10.1.
–     -> ‘OPatch 10.2’ This is opatch for database version 10.2.
–     -> ‘OPatch patch of version for Oracle software releases 11.1.0.x (OCT 2015)’ This is opatch for database version 11.1.0.x.
–     -> ‘OPatch patch of version for Oracle software releases 11.2.0.x and 18.x (APR 2018)’ This is opatch for database version 11.2.0.x. I have no idea what ‘and 18.x’ means.
–     -> ‘OPatch patch for DB 12.x and 18.x releases (JUL 2018)’ This is opatch for database version 12.1.x. NOT 12.x as the patch text indicates, it’s 12.1.x, and again I have no idea what ‘and 18.x’ means. I also don’t understand why the the 4th number is getting used all of a sudden.
–    -> ‘OPatch for DB 12.2 releases (JUL 2018)’ This is opatch for database version 12.2. The description now aptly describes the database version and does not confuse.
–    -> ‘OPatch for DB 18.x releases (JUL 2018)’ This is opatch for database version 18. The description again now aptly describes the version.

We are not there yet. Now that the patch release that should be used for every version of the database has been identified, let me throw in another version. This is the actual version that opatch reports when it is queried with ‘opatch version’. Let me list the opatch versions:
– -> opatch version
– -> opatch version
– -> opatch version
– -> opatch version
– -> opatch version
Yes, this is again some weirdness. The opatch version seemed to have followed the database version, and -apparently- starting from version 12.1 up to version 18 there is one opatch version: 12.2.

That begs the question whether the, and opatch versions is actually the same opatch version. I got these versions downloaded, with the opatch version included in the name:

$ md5sum p6880880*
1ee44d25f5e858eb67424b69b89b8a25  p6880880_121010_Linux-x86-64-
1ee44d25f5e858eb67424b69b89b8a25  p6880880_122010_Linux-x86-64-
1ee44d25f5e858eb67424b69b89b8a25  p6880880_180000_Linux-x86-64-

Okay…so these are actually 100% identical copies, which just have a different name. I have no idea why the exact same file is offered with a different name. This means that the addition of ‘and 18.x’ in the patch description of the release means that that opatch version can also be used with version 18 of the database.

To be honest, the original intention of this blog article was to describe the some specific usage of opatch, and I now already got enough content for a post, and will retain the original intended content for a next blogpost.

The question you might be having at this point is: but what version should I download now? For databases up to version 11.2 it is simple, there is actually only one choice for for each version. For database versions starting from version 12.1 you -currently- have a choice. I would advise simply downloading the “correct” opatch version for every database version, which means the exact oracle version as indicated in the release pulldown menu at the download page (‘Oracle’, ‘OPatch’ or ‘OPatch’) despite the fact that these are the same opatch versions *currently*.

I suspect that once 12.1 goes into extended support, the opatch version will freeze, whilst the opatch version for version 12.2 and 18 will be improved and increase in version. So the only way to download the correct opatch version is still by choosing the actual database version it is intended for.

This brings me to another important thing to realise: the actual opatch version that is downloaded. At the time of writing the current and only available opatch release for Oracle database versions 12.1 to 18 is Once oracle brings out a newer opatch version, the previous version will not be available anywhere anymore (as far as I know). To me this means that if you patch databases per tier (from test, development and so on up to production), you have to stage opatch in order to be able to use the same opatch version consistently in the future. Of course Oracle advises to use the latest opatch version, but the patch will check for a minimal opatch version, and if you tested your database software version, opatch version and patch to be working correctly together, in my opinion the most important thing is consistency.

  1. amitzil said:

    Nice post (and so true, it’s a mess).
    Just one comment about the last part. Because opatch is just a zip, you don’t have to keep the original zip file (even though it might be smart and maybe easier). For the production, you can just take the $ORACLE_HOME/OPatch from the test env and copy it to prod. When I copy a new opatch, I move the old opatch dir and don’t delete it, so I basically have all the opatch versions I’ve ever used.

    • There are so many ways to do it. I like to have a complete set of files for a change, which obviously means including opatch. The most important message I tried getting across is that the actual version of opatch can and will change without notification, so you shouldn’t rely on the opatch download to be the same as when you did in the past. Also older versions of opatch are not downloadable from Oracle as far as I know.

  2. It’s a mad mad world in opatch land. Never ceases to amaze me after 5 years of patching in the cloud.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: