AutoUpgrade New Features: Patch OCW Component In Oracle Home

Every Oracle home contains an Oracle Clusterware (OCW) component. It’s used to interact with Grid Infrastructure when you are using Oracle Restart or Oracle RAC. But even when you don’t use those, the component is still part of your Oracle home.

The Database Release Update doesn’t update the OCW component in your Oracle home. You must use the Grid Infrastructure Release Update for that.

In AutoUpgrade, it is easy to update the OCW component. Let’s see how it works.

How To Also Patch The OCW Component

  • My database hasn’t been patched for a while:

    $ORACLE_HOME/OPatch/opatch lspatches
    
    35648110;OJVM RELEASE UPDATE: 19.21.0.0.231017 (35648110)
    35787077;DATAPUMP BUNDLE PATCH 19.21.0.0.0
    35643107;Database Release Update : 19.21.0.0.231017 (35643107)
    29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
    
    • I’ve never updated the OCW component, so it’s still on the patch level of the base release, 19.3.0.0.0.
  • I use the latest version of AutoUpgrade:

    wget https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
    
  • I create an AutoUpgrade config file, FTEX.cfg:

    global.global_log_dir=/home/oracle/autoupgrade-patching/log
    global.keystore=/home/oracle/autoupgrade-patching/keystore
    patch1.source_home=/u01/app/oracle/product/19
    patch1.target_home=/u01/app/oracle/product/19_27
    patch1.sid=FTEX
    patch1.folder=/home/oracle/patch-repo
    patch1.patch=OPATCH,RU,OCW,DPBP,OJVM
    
    • By adding OCW to the patch parameter, AutoUpgrade also downloads the GI Release Update and updates the OCW component.
  • I patch the database:

    java -jar autoupgrade.jar -config FTEX.cfg -patch -mode deploy
    
  • When AutoUpgrade completes, I check the new patch level:

    $ORACLE_HOME/OPatch/opatch lspatches
    
    37499406;OJVM RELEASE UPDATE: 19.27.0.0.250415 (37499406)
    37654975;OCW RELEASE UPDATE 19.27.0.0.0 (37654975)
    37777295;DATAPUMP BUNDLE PATCH 19.27.0.0.0
    37642901;Database Release Update : 19.27.0.0.250415 (37642901)
    
    • Notice how the OCW Release Update is now 19.27.0.0.0.

Some Details

  • When AutoUpgrade downloads patches, because I specified OCW, it will also download the GI Release Update:

     --------------------------------------------
     Downloading files to /home/oracle/patch-repo
     --------------------------------------------
     DATABASE RELEASE UPDATE 19.27.0.0.0
         File: p37642901_190000_Linux-x86-64.zip - LOCATED
     
     DATAPUMP BUNDLE PATCH 19.27.0.0.0
         File: p37777295_1927000DBRU_Generic.zip - LOCATED
     
     GI RELEASE UPDATE 19.27.0.0.0
         File: p37641958_190000_Linux-x86-64.zip / 83%
    
  • Including OCW is a smart way of downloading the GI Release Update. You can use it to patch your Grid Infrastructure.

  • In Oracle Database 23ai, you can download fully updated gold images. Besides having the latest Release Update, they also come with fully updated OCW components.

Is It Needed?

Should you update the OCW component when you patch your Oracle Database? Is it needed if you don’t use Oracle Restart, Oracle RAC, or Oracle ASM?

It is optional, but even if no GI Stack (ASM, Clusterware or RAC) is used inside the server, it is recommended not to ignore the security patches of the installed components. And apply the most recent OCW Patch.

How to apply OCW Release Update patches on db_home non-RAC / non-ASM (Doc ID 2970542.1)

Mike Dietrich has a good point as well:

As I neither use RHP/FPP or any of the HA components nor EM in my tiny little lab environments, I’m pretty certain that I won’t need the OCW bundle. But this may be different in your environments. And it doesn’t harm to apply it of course.

Adding the Oracle 19.14.0 OCW / GI bundle patch to my database home

Further, I know many customers who never patch the OCW component and haven’t run into related problems.

My recommendation: Update the OCW component when you patch your Oracle Database. Using AutoUpgrade it is so easy, that there’s no reason not to.

Happy patching!

8 thoughts on “AutoUpgrade New Features: Patch OCW Component In Oracle Home

  1. Hello Daniel,

    Thanks a lot for pointing us to the OCW option for thepatch parameter. Now we almost got them all.

    Does AutoUpgrade has an more extensive help where we can see all the available options ?Because we had to find them on different places and the docs or sample does not show them all.

    patch1.patch=RECOMMENDED|RU|RU:x.y|OPATCH|OJVM|OJVM:x.y:|DPBP|patch-number|RU:x.y,patch-number,OPATCH

    Luckily we found the most important so here also happy patching using OCW, MRP and one-offs.

    Do you als know the option for downloading and patching the OCW/GI MRP ?

    Best regards

    William

    An Oracle restart user

    Like

    1. Hi William,

      I’m glad that I could be of service.

      You can find the up-to-date list of values for the patch parameter in the documentation:
      https://docs.oracle.com/en/database/oracle/oracle-database/23/upgrd/patch-parameters-autoupgrade-config-file.html#GUID-A7E6221E-5964-4553-9A63-61B2E4AB1CBD

      We got a few more coming in the next release of AutoUpgrade. Typically, it takes a short while for the docs to get updated too.

      There’s no option to download the GI MRP. But it could be very useful. I’ll add that to our list of good ideas.

      Thanks,
      Daniel

      Like

  2. Hello Daniel,

    Thank you.

    I am sure this is already on your list of ideas but are there short term plans to add the out of place patching of Grid Infrastructure homes to AutoUpgrade ? This way we can have one solution for the whole Oracle Restart / SIHA stack.
    We want to replace some custom scripts with AutoUpgrade but besides downloading this seems not possible at the moment. It concerns 5 script i.e. steps:

    • extract GI 19.3 to a new GI home
    • download GI patches: RU and/or MRP and/or one-off(s)
    • update OPatch of the new GI home
    • patch (gridSetup.sh) the new GI home
    • switch GI home using roothas.sh and runInstaller updateNodeList

    Note: we really do not want to make use of Fleet Provisioning Patching or Fleet Maintenance

    Best regards

    William

    Like

    1. Im uusing ansible to automate all of those steps, except for the switch.

      I automate all steps as preparation before downtime, and in downtime, I do the switching of both GI home and dB homes then run data patch manually.

      Saving me huge time in the window

      Like

  3. Hi Daniel,

    First of all, congratulations on your blog; it’s excellent and very helpful. I have a question regarding out-of-place patches in both GI/DB. If I use a 19.3 base software image and apply the new patch, what happens to the patches already installed in previous home installations? Would they be lost? This is considering that some patches are localized and not cumulative across the RUs.

    Also, what procedures or tasks should we perform before applying a patch to GI/DB to ensure a successful rollback if needed? In addition to backing up the old home installation, is it necessary to back up the database, GI/DB configuration files, and other files?

    Thank you very much.

    Regards,

    Víctor Guzmán

    Like

    1. Hi Victor,

      When you use out-of-place patching, you’re building a new Oracle home. Most likely, it has a newer/higher Release Updates. Release Updates are cumulative, so you get much more patches. However, if you have any other patches installed, you’d need to find those patches again for the matching Release Update.
      If you don’t applyt the same one-offs to your new Oracle home, then Datapatch will roll them off, when you move to the new Oracle home.

      If you have one-off patches, I suggest that you check in ORAdiff (oradiff.oracle.com) whenever you patch, to double-check whether those patches have been included in your Release Update.

      If you use AutoUpgrade to download patches and build your Oracle home, it’s very easy to have those one-off patches included. Just include the patch number in the patch specification, and AutoUpgrade will find the right ones for you.

      The Easiest Way to Download 19.27 Release Update

      If you use out-of-place patching, you have the best rollback options, because you preserve the source Oracle home. In case of a rollback, you simply move the database back to the original Oracle home and run Datapatch. Then you’re back to where you started.
      With in-place patching a rollback because quite a pain, because you need to bring the Oracle home back (either with a restore from backup or with opatch commands).
      It is not necessary to back up any files. The rollback process is understood by any component in Oracle home.

      We strongly recommend using out-of-place patching for the database and GI.

      THANK YOU for the nice words on my blog. I’m glad you like it and find it useful.

      Regards,
      Daniel

      Like

Leave a reply to Daniel Overby Hansen Cancel reply

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