Restarting a failed Database Upgrade with DBUA 12.2

In my previous blog post I did showcase how to restart a failed database upgrade on the command line before Oracle Database 12c, with Oracle Database 12.1.0.x and with the new Oracle Database 12.2.0.x:

Restarting a failed Database Upgrade with catctl.pl

Here I’d like to show the new capability of the Database Upgrade Assistant (DBUA) to restart an upgrade, a functionality the DBUA was missing until now. Please note that you can always go back to the command line, no matter in which version you have used the DBUA.

I won’t describe an upgrade with the DBUA in this blog post as this is showcased in the documentation already:

Starting the database upgrade with DBUA

I will upgrade the UPGR database well known from our Hands-On Lab.

DBUA Database Selection Oracle 12.2

And please don’t put in your credentials in the fields below – if you are logged in as the oracle user then this will lead to failure and drive you crazy …

Another thing which puzzles me:
I still have to execute the olspreupgrade.sql script from the newer (in my case the 12.2) home by myself. I’d wish
the DBUA would do this for me as well as I’ll have to open an xterm, set my environment and type in a very long path name to point to the new 12.2 home in order to execute this script in my source environment.

DBUA Database Selection Oracle 12.2

Ok, let’s kick off the upgrade:

Oracle 12.2 DBUA Database Upgrade

The progress bar is very imprecise in relation to the duration – you can ignore it more or less.

And – very sad – the Alert and Activity Monitor buttons disappeared – but they may reappear in a later release of the DBUA.
.

The Error Scenario

It’s always fun to kill pmon finding out how cool this database is 😉 It survives the deadly attack 🙂 Of course it does … it’s the Oracle Database 😉

kill -9 pmon

Bang!
.

The DBUA recognizes the failure

Even though the DBUA recognized the failure quite quickly it still tries to complete the upgrade – which of course results in a ton of errors. It just means that you’ll have to wait until the DBUA has “progressed” the upgrade till the end – and DON’T CLOSE THE DBUA as otherwise you’ll lose the ability to RETRY.

DBUA - upgrade failure

You’ll see the error count going up until the DBUA has reached the “end” of the (failed) upgrade.

DBUA Oracle 12.2 - upgrade failure scenario 2

And then it displays the RETRY button:

DBUA Oracle 12.2 - upgrade failure scenario

Rerun the Database Upgrade

Once you hit RETRY the DBUA will try to solve the situation – and in my case it will start up my source database in STARTUP UPGRADE mode again – and then process the upgrade using the -R option of catctl.pl (described in the previous blog post)

DBUA Oracle 12.2 - upgrade failure scenario

You’ll find also a new set of logfiles in $ORACLE_BASE/cfgtoollogs/dbua/ subdirectories indication with a number (here: 1) and an “R” that this is the first restart attempt’s logs:

Logfiles from DBUA rerun 12.2

–Mike

5 thoughts on “Restarting a failed Database Upgrade with DBUA 12.2

  1. Mike,
    As usual, excellent posts about 12.2 upgrade. My question is: Let’s say during upgrade, some database related issue is found and upgrade fails. To correct the issue, I have to start the database in normal mode which might be impossible because upgrade already made changes to data dictionary half way. What is my course of action?

    Thanks,
    Arun

  2. Arun,

    you raise a very good question.

    There are things you can solve in STARTUP UPGRADE mode. But once the upgrade kicked off you usually can’t start it in NORMAL MODE anymore as you’ll get BOOTSTRAP TABLE errors.

    If you really can’t fix something in STARTUP UPGRADE mode anymore than I would FLASHBACK DATABASE to a GUARANTEED RESTORE POINT which is my preferred way of resolving issues during upgrade (or for testing). Now I know that you can’t use this technique with SE environments as there’s no FLASHBACK DATABASE in SE. In this case you can only restore your backup, either your ONLINE backup or your PARTIAL OFFLINE backup (both described in the FALLBACK section in our big slide deck).

    Thanks
    Mike

  3. Pingback: Restarting a failed Database Upgrade with catctl.pl | Upgrade your Database - NOW!

Leave a Reply

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