Patching my databases with the July 2018 PSU, BP and RU

Patching my databases with the July 2018 PSU, BP and RUAs usual I download the patch bundlesΒ  and apply them to our Hands-On Lab environment as quickly as possible. First of all for the simple reason that I don’t want to trap into issues which are fixed already. Second for the reason that I always tell you: YOU MUST PATCH! But if I’m saying this over and over again, then I can’t have my own environments unpatched. And at third, because I want to learn if anything is not working correctly or has changed (see below).

Of course my tiny single instance environments are not comparable to your critical production sites. And I don’t have to complete any extra tests. Or include the patch into a Rapid Home Provisioning rollout plan. So for me it’s a fairly simple task whereas for you it usually involves more work.

Patching my databases with the July 2018 PSU, BP and RU

As you can see from my previous blog post, I figured out already which patches I need to download, I learned about the July 2018 Risk Matrix scores, and I checked the READMEs as well.

Then as next step, I will have to verify the prerequisites including OPatch, and afterwards apply the patch bundles. I don’t patch OJVM as I didn’t include it in any of my databases.

Prerequisites

For the Oracle 11.2.0.4 PSU I must ensure OPatch utility version 11.2.0.3.6 is installed. In my case it is already. Hence, no action needed here. But for Oracle 12.1.0.2 there’s a change.

Important change:
Different from previous runs where I simply used the 12.2/18c OPatch as you could see in April 2018 to patch also my Oracle 12.1.0.2 databases, this will fail now since the OPatch 12.2.0.1.14 version.
When you invoke it from a different home, you’ll see the below error pattern.
Thus, you MUST install the version of OPatch into your 12.1.0.2 homes now as well.

$OH18/OPatch/datapatch -verbose
...
Queryable inventory could not determine the current opatch status.
Execute 'select dbms_sqlpatch.verify_queryable_inventory from dual'
and/or check the invocation log
/u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_16186_2018_07_18_13_07_29/sqlpatch_invocation.log
for the complete error.
Prereq check failed, exiting without installing any patches.
...
SQL> select dbms_sqlpatch.verify_queryable_inventory from dual;

VERIFY_QUERYABLE_INVENTORY
--------------------------------------------------------------------------------
ORA-20001: Latest xml inventory is not loaded into table

As far as I can see, there reason seem to be the 3 directories OPatch creates in the database (see DBA_DIRECTORIES). But I didn’t went into details as my shortcut most likely wasn’t meant to work anyways. Hence, I can’t blame anybody πŸ™‚

For Oracle 18.3.0 the OPatch requirement is now OPatch utility version 12.2.0.1.14. As my current version is Opatch 12.2.0.1.13 I will need to update it via patch 6880880.

Patching my databases with the July 2018 PSU, BP and RU

In the README I find the following install instructions:

  1. Please take a backup of ORACLE_HOME/OPatch into a dedicated backup location.
  2. Please make sure no directory ORACLE_HOME/OPatch exist.
  3. Please unzip the OPatch downloaded zip into ORACLE_HOME directory

This is not complicated.

. cdb2
cd $ORACLE_HOME
tar -czf opatch_old_del_later.tar OPatch
rm -rf OPatch
cp /media/sf_TEMP/p6880880_180000_Linux-x86-64.zip .
unzip p6880880_180000_Linux-x86-64.zip
cd OPatch

Afterwards I verify the version – and this looks good.

[CDB2] oracle@localhost:/u01/app/oracle/product/18/OPatch
$ ./opatch version
OPatch Version: 12.2.0.1.14

OPatch succeeded.

Good thing: I can use this version also for the 12.1.0.2 patching but I will have to install it this time separately into my 12.1.0.2 home as well.

Patching Oracle 11.2.0.4 with the July 2018 Patch Set Update

As I don’t have an Engineered System unfortunately, I patch my single instance 11.2.0.4 environment with the July PSU.

And as I showed the task in step-by-step instructions already in April, I recorded a short 3 min video this time:

.

Patching Oracle 12.1.0.2 with the July 2018 Bundle Patch

Please find all the steps in the README. As noted above it is now important to have the OPatch utility installed into the same Oracle Home as otherwise the inventory can’t be queried within the database.

.

Patching Oracle 18.1.0 with the July 2018 Update

I have applied the 18.2.0 Update already a few weeks ago to my Oracle 18.1.0 environment. But for this exercise I use a standard 18.1.0 environment. For most of you this task won’t be necessary as you’ll start off with Oracle 18.3.0 on premises anyway, and hence don’t have to apply the July 2018 Update (RU).

All the necessary steps are similar to Oracle 12.2.0.1 patching. You can find them in the README.

In brief:

$ORACLE_HOME/OPatch/opatch version

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /media/sf_TEMP/p28090523_180000_Linux-x86-64/28090523

cd /media/sf_TEMP/p28090523_180000_Linux-x86-64/28090523

$ORACLE_HOME/OPatch/opatch apply

$ORACLE_HOME/OPatch/datapatch -verbose

But please see the short video below:

.

–Mike

23 thoughts on “Patching my databases with the July 2018 PSU, BP and RU

  1. Hi Mike,

    First of all thanks for your blogs, they are always handy πŸ™‚

    Let’s go to the questions, shall we ?

    I used to find the client-installation patchset in the full RDBMS patcheset.

    Do you happen to know where I can find the RU (12.2.0.1 – July 17, 2018) for OCI Client on linux x64 ?

    Cheers.

    Alessio.

  2. is there any way to clean up the sql_patch dictionary views in the database if cloned from non patched home.

    i.e. we have an oracle home with DATABASE BUNDLE PATCH: 12.1.0.2.160719 (23144544) and there is cloned databases from the same version

    now i updated the cloned database rdbms home to july 2018 but i’m getting the below error

    Connecting to database…OK
    Bootstrapping registry and package to current versions…done
    Determining current state…done

    Current state of SQL patches:
    Patch 23177536 (Database PSU 12.1.0.2.160719, Oracle JavaVM Component (JUL2016)):
    Installed in the SQL registry only
    Bundle series DBBP:
    ID 180717 in the binary registry and ID 160719 in the SQL registry

    Adding patches to installation queue and performing prereq checks…
    Installation queue:
    The following patches will be rolled back:
    23177536 (Database PSU 12.1.0.2.160719, Oracle JavaVM Component (JUL2016))
    The following patches will be applied:
    27547374 (DATABASE BUNDLE PATCH 12.1.0.2.180717)

    Error: prereq checks failed!
    patch 23177536: Archived patch directory is empty
    Prereq check failed, exiting without installing any patches.

    Please refer to MOS Note 1609718.1 and/or the invocation log
    /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3505_2018_07_19_11_38_58/sqlpatch_invocation.log
    for information on how to resolve the above errors.

    SQL Patching tool complete on Thu Jul 19 11:39:38 2018

    • Samer,

      this is a typical and known issue. When you clone often the patch directory for the previous patch is not present anymore. The workaround I know: copy this directory to the new home, then it can be rolled back.

      Please see here:
      https://support.oracle.com/epmos/faces/DocumentDisplay?id=2235541.1
      And ignore the first workaround which is complete nonsense as nobody can rollback a patch before cloning in PROD.

      Cheers,
      Mike

      PS: And yes, I know this is a “questionable design”. Yes …

  3. Hi πŸ™‚
    1. Please take a backup of ORACLE_HOME/OPatch into a dedicated backup location.
    Solution:
    rm -rf OPatch

    Good approach πŸ™‚

    • Don’t be so picky, Arek. It’s a burn&destroy testing environment in my case πŸ˜‰
      But for your convenience I added a “tar -czf opatch.tar OPatch” πŸ˜‰

      Cheers,
      Mike

      PS: I don’t really understand the idea of backing up the opatch directory. I can always install almost any version.

  4. Any video on how to apply “this” (Patching Oracle 12.1.0.2 with the July 2018 Bundle Patch) to a ASM GRID RAC infrastructure? The information given in the readme are confusing and outdated.

  5. Mike,
    We perform out-of-place patching.
    We had to rollback the July 2018 PSU(12.2.0.1 + Jul 2018 PSU) and apply Jan 2018 PSU(12.2.0.1 + Jan 2018 PSU).
    We shutdown the database from Home with Jul 2018 PSU and started one instance in upgrade mode from Jan 2018 PSU ORACLE_HOME. It did not work.
    Datapatch was able to rollback July PSU but did not install Jan PSU. Is this expected ?
    I found that in the Bundle_id column the value was 180116 for the entry for ROLLBACK of Jul PSU.

    * select PATCH_ID,PATCH_UID,VERSION,FLAGS,ACTION,INSTALL_ID,BUNDLE_SERIES,BUNDLE_ID,action_time from dba_registry_sqlpatch where BUNDLE_SERIES=’DBRU’
    SQL> /

    PATCH_ID PATCH_UID VERSION FLAGS ACTION INSTALL_ID BUNDLE_SERIES BUNDLE_ID ACTION_TIME
    ———- ———- ——————– ———- ————— ———- —————————— ———- —————————————————————————
    28163133 0 0 NB APPLY 1 DBRU 180717 01-AUG-18 03.27.40.522063 PM
    28163133 22313390 12.2.0.1 NB APPLY 2 DBRU 180717 01-AUG-18 04.00.23.374650 PM
    28163133 22313390 12.2.0.1 NB ROLLBACK 3 DBRU 180116 21-AUG-18 07.29.35.869762 AM

    Could you please let me know the best way to achieve this? Thanks

    • Sunil,

      sorry to read this. And I feel bad when I see such messages.
      Unfortunately I can’t diagnose such issue – you will have to log an SR but I’m always happy to read about the solution.

      I was away the past two weeks – I hope you could solve it in between.

      Thanks,
      Mike

  6. Mike,
    Thanks

    We rolled back the July 2018 RU from current home and stopped the database,

    We then started the database from new home(12.2.0.1 + Jan 2018 RU) and executed Datapatch.

    This way, it complained about Database Vault and OLS is not present. We did not install these to start with.
    Not sure why did Datapatch complain about the components those were never installed in the first place.
    Worked with Oracle Support and they asked us to create Database Vault schema (and its metadata) and enable OLS (using Doc ID 2176049.1)

    • Argh … I think the reason is that datapatch is not component agnostic. Meaning, if a patch contained a specific fix for lets say DV and you had no DV present, it failed. I thought this had been fixed and included. But when I read your message I have my doubts.

      What should I say πŸ™

      But I checked the note you are referring to: 2176049.1
      And I disagree with the content. There’s no such thing as a mandatory DV. None of my databases in my test envs has DV installed.

      I read it now 3 times and maybe I don’t get the point.

      I think the problem is NOT the non-existence of DV or OLS but the fact that datapatch has changes for a component which is not present but does not recognize the component isn’t present.

      Mike

  7. Mike,
    I am putting together instructions on applying the July 2018 QFSDP to Exadata and noticed that the OJVM patching instructions (README.html) for 12.1.0.2 and 11.2.0.4 databases just says:

    “README is being worked”

    The README paths are:
    28183368/Database/12.1.0.2.0/12.1.0.2.180717OJVMPSU/27923320
    28183368/Database/11.2.0.4.0/11.2.0.4.180717OJVMPSU/27923163

    The README.html for 18.3 has complete instructions in the same patch. I have opened a SR. See what support says.

    Thanks,
    Arun

  8. Hello Mike,

    I recently applied Q3 2018 PSU to a standalone 11.2.0.4 database with Oracle Restart configuration. The initial attempt failed as I had not stopped database and a DBA had left a sqlplus process open. Upon subsequent opatch auto run, while the grid home got patched correctly, the database home is still showing old OCW patch. Any idea how I can get only OCW patched? Below are opatch details (post patching)
    Grid Home:
    $ $ORACLE_HOME/OPatch/opatch lspatches
    27959254;ACFS Patch Set Update : 11.2.0.4.180717 (27959254)
    27441052;OCW PATCH SET UPDATE: 11.2.0.4.180417 (27441052)
    27734982;Database Patch Set Update : 11.2.0.4.180717 (27734982)
    19852360;

    OPatch succeeded.

    Database Home:
    $ $ORACLE_HOME/OPatch/opatch lspatches
    27923163;OJVM PATCH SET UPDATE 11.2.0.4.180717
    27734982;Database Patch Set Update : 11.2.0.4.180717 (27734982)
    23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319)

    OPatch succeeded.

    • Narendra,

      apply the OCW patch again to the database home (after stopping all services).
      This should do the trick.

      I guess that there were services up and hence files and the inventory couldn’t be changed.
      I’d guess as well that the patch apply didn’t succeed and got rolled back for the subcomponent OCW.

      Cheers,
      Mike

  9. Thanks Mike.
    This is where I am struggling. According to support note Doc ID 1595371.1, it seems OCW patch can not be separately downloaded and when I tried applying patch 27967757 again, it still did not appear to have updated DB home with correct patch for OCW. Am I missing anything?

    • Narendra,

      but you can install it separately even if it’s not available as a separate download.
      You need to enter the 27441052 subdirectory and install the patch.

      Otherwise please open an SR and check with Oracle Support.

      Thanks,
      Mike

Leave a Reply

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

* Checkbox to comply with GDPR is required

*

I agree

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