How to patch the Oracle Instant Client?

How to patch the Oracle Instant Client?That’s an interesting question a customer raised the other day:

How to patch the Oracle Instant Client?

I silently assumed that there’s a new release of the Oracle Instant Client every quarter or at least when we deliver fixes which apply to the client as well. Hm …

What is the Oracle Instant Client?

First of all, the Oracle Instant Client is a pretty cool thing. It gets distributed via OTN as a simple download. You deploy it to your client machine, you set LD_LIBRARY_PATH (or PATH on Windows) and add a tnsnames file if necessary, you may add SQL*Plus and other tiny little pieces. And then you start. No installation is happening.

It’s free, it’s light-weight, and contains Oracle Database tools, libraries and SDKs for building and connecting applications to an Oracle Database instance.

Find more information on OTN.

The Instant Client for Oracle Database 12.2 is available for download here. And when you scroll down you will find even older versions. And of course there’s a Docker image available as well from the Docker store.

Once you downloaded your Instant Client you’ll have to:

  1. Unzip the package (you will need at least either the BASIC or BASIC LIGHT package) into a directory
  2. Set your environment’s library loading path variable (for instance LD_LIBRARY_PATH) to this directory
  3. You may add your tnsnames.ora and let TNS_ADMIN point to it
  4. Then you’ll start your application

And of course you’ll find more information in the Instant Client’s White Paper and on the FAQ page.

How to patch the Oracle Instant Client?

But now the crucial question is:
How do I patch the Instant Client? Or do I need to patch the Instant Client?

If you look at a PSU’s readme you’ll find out that it is mentioned to be installable for the Instant Client as well. But no information is given on how to install the PSU into your Instant Client deployment.

How to patch the Oracle Instant Client?

PSU Readme – July 2017 – Instant Client Installations are included – but the link points you only to the book, not the chapter

You’ll find the solution in the OCI Programmer’s Guide for each release, for instance for Oracle Database 12.2. Find the correct link here:

About Patching Instant Client Shared Libraries on Linux or UNIX

And it is a quite interesting process.

First of all, you can’t patch the Instant Client directly with a PSU or BP or RU or RUR. You will need to have a full client admin installation of the Oracle Client. This installation will have all the libs you’ll need to provide the patch for the Instant Client.

Step number one: you will patch your Client Admin Installation with the PSU or BP or RU or RUR.

Then make sure you’ll have a compiler and a linker installed on the same system. This is necessary since Oracle Database 12.1.0.1 to regenerate data shared library and zip and rpm files. And let me add that this process is not available on Windows.

Once you fulfill all the requirements you can generate Instant Client zip and RPM files for OCI and OCCI, JDBC, and SQL*Plus as described in Regeneration of Data Shared Library and Zip and RPM Files. I don’t replicate the steps. The documentation describes them in clear detail.

Finally you can deploy now a patched version of the Instant Client to your targets.

Needless to say that I personally find the process quite a bit “hairy” … Plus I couldn’t find out what to do on platforms where either the process does not exist (Windows) or where no PSU or BP gets delivered (Mac OS X for instance).

–Mike

Leave a Reply

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