Tuesday, March 4, 2014

How to resume 12c manual upgrade

Few weeks ago, I was attended "12c Upgrade Workshop". In 12c, there is a new script, catctl.pl.

The catupgrd.sql Upgrade utility is replaced with the catctl.pl utility. The new utility allows you to take advantage of CPUs by running the upgrade process in parallel thereby reducing the upgrade time.
In my test upgrade, I was have a some problem, and upgrade process was break:

So, when I fixed the problem, I try to restart upgrade again with -p parameter: (doc + some wrong examples from net)

Option “-n” specifies the degree of parallelism, the default is 4 and maximum is 8.
Option “-p” supports rerun of the upgrade by skipping successful steps.
-p Restarts the specified phase (skip successful phases on a rerun).

But without success.


Important: In $ORACLE_HOME/diagnostics directory, there is log files about upgrade, DO NOT DELETE THEM, because, than upgrade can not restart  !!
Number of files depends of parallelism.

You get this error:

When we look this file ( catctl.pl), and find usage on start of file:

Usage: catctl [-u username] [-n processes] [-d directory]
                [-t table] [-l directory] [-s script]
                [-e] [-i] [-c] filename

  Supported Options:

     -u username (prompts for password)
     -n the number of processes to use for parallel operations (default 4)
     -d directory containing the files to be run
     -t table name for phase logging
     -l directory to use for spool log files
     -s SQL script to initialize sessions
     -e sets echo off while running the scripts
     -p restart phase (skip successful phases on a rerun)
     -i identifier to use when creating spool log files
     -y display phases only

There is not -p in usage, and in options there is. But not working.

Investigating further in file, we find part of code:

Then, we figured out that it must be Phase Number from which we want to restart, Oracle is not so clever to find that in log files!!! :-)

And than finally:

is what we looking!!! Rerun succeded..

Oracle doc is not very explicit about that feature, and there is no anywhere right example with rerun/resume upgrade on 12c