How to Patch Oracle Database on OCI Exadata

How to Patch Oracle Database on OCI Exadata?

Patching Oracle Database on OCI Exadata can be performed via OCI Console UI or by patching oracle grid infrastructure and oracle databases using dbaascli. In this blog post, we will look at how to perform the task of patching the Oracle Database on OCI using the dbaascli tool.

Personally, I prefer the dbaascli tool as I suspect many DBA types will as they are very comfortable on the Linux command line and sometimes prefer this to clicking on some buttons on a web UI.

Whether you choose to use the dbaascli tool detailed in this blog post or via the OCI Console both methods involve no downtime where each Oracle Database node is patched individually enabling you to achieve no downtime patching of the Oracle Database.

Patch Oracle Database on OCI Exadata
Oracle Database on OCI Exadata

Firstly as part of Exadata patching best practices before any patching takes place and just like in my previous article where I detailed “Exadata Grid Patching” we want to ensure we are using the latest version of dbaascli. We can do this by first finding out our current installed version, checking the latest version then choosing to upgrade dbaascli if we have found it not to be running the latest. All commands below are run as the root user.

Check the existing dbaascli version installed on the host/server.

rpm -qa|grep -i dbaastools

Find the latest available version of dbaascli

dbaascli admin showLatestStackVersion

Update to the latest version of dbaascli if you aren’t already running the latest version.

dbaascli admin updateStack

Now that we are using the latest version of dbaastools we can proceed and begin to look at the Exadata patching steps on applying the latest patch set to Oracle Database.

In my example, I am currently running Oracle Database 19.5, therefore, these steps will detail how to patch Oracle 19c and will be looking to upgrade to the latest version which at the time of writing is 19.17 but the same steps are valid for all supported Oracle Database versions. Again all commands below are run as the root user.

Run Pre-checks to ensure your system is in a good place to apply the latest patch. Any issues highlighted by the pre-checks such as invalid objects or bad or obsolete database parameters should be resolved before you continue and begin applying the patch to try and ensure a smooth error-less patching cycle.

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.17.0.0 --executePrereqs

Assuming pre-checks are OK we can now apply the latest patch set, as mentioned previously as of writing the latest patch set is 19.17.0.0. All commands below are run as the root user.

dbaascli dbHome patch --oracleHome /u01/app/oracle/product/19.0.0/dbhome_1 --targetVersion 19.17.0.0

We are applying the patch set to the ORACLE_HOME in which our target DB is running, the automations bundled into dbaascli tool take care of running datapatch once the ORACLE_HOME binaries have been patched meaning that assuming no errors we have now successfully patched our Oracle Database to 19.17.

We can confirm the database version by running OPatch as the oracle Unix user.

$ORACLE_HOME/OPatch/opatch lspatches

That is all there is to it, as mentioned at the start of this post you can perform this task via the OCI Console UI, I prefer using the Unix command line as I feel it gives a better verbose output to view the progress of the patching and be able to make better estimates on the time left until patching is completed.

The dbaascli tool automates 99% of the process bar the initial kick-off. Oracle produces full documentation on how to use the dbaascli tool on Exadata here.

If you liked this post please see some of my others here, This is the second post of my series on Oracle Exadata patching my first post shows how to perform patching Oracle Grid.


Posted

in

by

Tags:

Leave a Reply

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

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