With Oracle Database 12c support coming to an end soon I thought I should write a short blog post on how to upgrade an Oracle 12c Database running on Exadata within OCI to Oracle Database 19c. The upgrade process can be performed via the OCI Console or also via the dbaascli tool. Having been a DBA for a long time now I prefer using dbaascli command line tool as I feel the verbose output it provides to be far more informative that the percentage complete status that OCI Console provides.
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 upgrade steps on how to upgrade Oracle Database to 19c. In this post I am upgrading a 12c database to 19c, but these steps are also appropriate for how to perform Oracle Database upgrade from 184.108.40.206 to 19c.
Run Pre-checks to ensure your database is in a good place to be upgraded. 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 upgrading the database to try and ensure a smooth error-less upgrade cycle.
dbaascli database upgrade --dbname TSTDB --targethome /u01/app/oracle/product/220.127.116.11/dbhome_1 --executePrereqs
Assuming pre-checks are OK we can now start the upgrade. All commands below are run as the root user.
dbaascli database upgrade --dbname TSTDB --targethome /u01/app/oracle/product/18.104.22.168/dbhome_1
Should something go wrong we can roll back using the following…
dbaascli database upgrade --dbname TSTDB --targethome /u01/app/oracle/product/22.214.171.124/dbhome_1 --revert
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.