How to Patch Oracle Database on the Oracle Cloud

I was waiting the latest PSU for Oracle Database 11.2.0.4 on the Oracle Database Cloud Service, and today I noticed that it’s available. So let’s see how we can update our Oracle Databases in the cloud.

First we go to the database home to see if any updates is available. As you can see, in the administration box, there is an available patch. We click on it to see the details of the patch.

It’s the PSU Update 11.2.0.4.161018! I can read the readme file of the patch (from Oracle support) when I click the readme link. On the right side, there’s an action menu to run a precheck (prerequisites check) and to apply the patch. I run the precheck first, so I can be sure that I won’t have any problem when applying the patch.

Oh, the prerequisites checks failed!

Honestly, this is not my first time to apply a patch on Oracle Database Cloud Service. In my previous try about 2 or 3 months ago, I applied the latest PSU without any problem. It was a very smooth process, took less than hour. This time, the prerequisites failed.

Unfortunately, database home page doesn’t show any details about which prerequisite is failed. I wanted to try my chance with command line tools. Oracle Cloud provides dbaascli tool to manage Database Service including patching but some of its functions require root privileges. So I logged in to my cloud server via SSH as “opc” user – this user has sudo rights so I can switch to root user. And I issued “dbaascli dbpatchm –run -prereq” command to precheck the avaliable database patch.

No luck! I found a thread on Oracle Community saying we need to update dbaascli package (cloud tooling).

So I tried to check my version:

Not very informative at the beginning! Then I read the log file and see that there’s an update available for dbaascli:

According to the Oracle documents, I need to update the dbaascli package using dbaascli itself:

There’s a warning but it seems it’s updated. I execued “dbaascli dbpatchm –run -list_tools” again, check the logs and saw that it’s updated.

I used dbaascli to check prerequisites and see the same output with my previous one. So I felt like it didn’t work. To be sure, I also tried to check prerequisites on the Oracle Database Cloud Service Console, and it completed OK this time.

I tried to compare logs of my previous dbaascli runs, and I noticed that even you use web console to patch your database or check prerequisites of a patch, and I discovered that my first attempt failed because of dbaastools version!

At least I found where the logs are located!

[box type=”shadow”]You can find the logs of database patching process in /var/opt/oracle/log/dbpatchm/ folder.[/box]

I clicked “patch” on the action button. It asks me to enter a note and if I want to force the patch apply, I just entered “it’s so easy to patch :)” and click “patch” button.

I waited about 25 minutes to see the latest patch is applied and database is up! After all this work, I remembered that some people say there’s no need for DBAs for managing databases in the cloud 🙂

Please share this post Share on Facebook0Share on Google+0Share on LinkedIn159Share on Reddit0Tweet about this on Twitter

Gokhan Atil is a database architect who has hands-on experience with both RDBMS and noSQL databases (Oracle, PostgreSQL, Microsoft SQL Server, Sybase IQ, MySQL, Cassandra, MongoDB and ElasticSearch), and strong background on software development. He is certified as Oracle Certified Professional (OCP) and is awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for his continuous contributions to the Oracle users community.

Leave Comment

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