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 188.8.131.52.0
– OPatch 184.108.40.206.0 – EMCC
– OPatch 220.127.116.11.0
– OPatch for FMW 12c (OUI 13.9.x) – Obsolete FMW(?)
– OUI NextGen 13.1 – FMW
– OUI NextGen 13.2 – FMW
– Oracle 10.1.0.0.0
– Oracle 10.1.0.3 – Obsolete
– Oracle 10.2.0.0.0
– Oracle 18.104.22.168.0
– Oracle 22.214.171.124.0
– Oracle 126.96.36.199.0
– Oracle 188.8.131.52.1 – Obsolete
– Oracle Database 184.108.40.206 – 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 220.127.116.11.0 – Patch 6880880: OPatch 18.104.22.168.14 for DB 12.2 releases (JUL 2018)
– OPatch 22.214.171.124.0 – Patch 6880880: OPatch 126.96.36.199.14 for DB 18.x releases (JUL 2018)
– Oracle 10.1.0.0.0 – Patch 6880880: OPatch 9i, 10.1
– Oracle 10.2.0.0.0 – Patch 6880880: OPatch 10.2
– Oracle 188.8.131.52.0 – Patch 6880880: OPatch patch of version 184.108.40.206.9 for Oracle software releases 11.1.0.x (OCT 2015)
– Oracle 220.127.116.11.0 – Patch 6880880: OPatch patch of version 18.104.22.168.19 for Oracle software releases 11.2.0.x and 18.x (APR 2018)
– Oracle 22.214.171.124.0 – Patch 6880880: OPatch 126.96.36.199.14 for DB 12.x and 18.x releases (JUL 2018)
If we follow the versions from the lowest to the highest versions of Opatch:
– 10.1.0.0.0 -> ‘OPatch 9i, 10.1’ This is opatch for database versions 9i and 10.1.
– 10.2.0.0.0 -> ‘OPatch 10.2’ This is opatch for database version 10.2.
– 188.8.131.52.0 -> ‘OPatch patch of version 184.108.40.206.9 for Oracle software releases 11.1.0.x (OCT 2015)’ This is opatch for database version 11.1.0.x.
– 220.127.116.11.0 -> ‘OPatch patch of version 18.104.22.168.19 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.
– 22.214.171.124.0 -> ‘OPatch patch 126.96.36.199.14 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.
– 188.8.131.52.0 -> ‘OPatch 184.108.40.206.14 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.
– 220.127.116.11.0 -> ‘OPatch 18.104.22.168.14 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:
– 22.214.171.124.0 -> opatch version 126.96.36.199.9
– 188.8.131.52.0 -> opatch version 184.108.40.206.19
– 220.127.116.11.0 -> opatch version 18.104.22.168.14
– 22.214.171.124.0 -> opatch version 126.96.36.199.14
– 188.8.131.52.0 -> opatch version 184.108.40.206.14
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 220.127.116.11.0, 18.104.22.168.0 and 22.214.171.124.0 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-126.96.36.199.14.zip 1ee44d25f5e858eb67424b69b89b8a25 p6880880_122010_Linux-x86-64-188.8.131.52.14.zip 1ee44d25f5e858eb67424b69b89b8a25 p6880880_180000_Linux-x86-64-184.108.40.206.14.zip
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 220.127.116.11.0’, ‘OPatch 18.104.22.168.0’ or ‘OPatch 22.214.171.124.0’) 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 126.96.36.199.14. 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.