Wednesday, April 16, 2014

Upgrade your Database to 12c Superfast!

Most DBAs know about the catupgrd.sql script Upgrade Utility to process the upgrade singled threaded. Now there is a faster way to upgrade your Oracle Database to 12c, you can use the catctl.pl the Parallel Upgrade Utility – a perl script, which replaces catupgrd.sql and provides both parallel processing mode and serial mode. This will greatly help reduce downtime for a database upgrade to 12c and I highly recommend you use this option.

The –n option Specifies the number of processes to use for parallel operations (default = 4). The maximum is 8. Set this parameter to 0 to run catctl.pl in serial mode.

The catctl.pl Parallel Upgrade Utility is integrated with DBUA the gui upgrade utility. However, for manual, command line upgrades, you can run catctl.pl with various parameters

If -n 3 is used when invoking catctl.pl, then catupgrd0.log, catupgrd1.log, catupgrd2.log are created during the upgrade process. When confirming if an upgrade ran fine or failed, all of the catupgrd#.log files must be checked. If catctl.pl is rerun, then the previous log files are overwritten unless you specify a different log directory.

To run catctl.pl on Linux from the new Oracle 12c home.


cd $ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl catctl.pl -n 3 -l $ORACLE_HOME/diagnostics catupgrd.sql


Once you start the database in upgrade mode by issuing the following command:
SQL> STARTUP UPGRADE

The UPGRADE keyword prepares the database for the upgrade.

Once the database is started in upgrade mode, only queries on fixed views execute without errors until after the catctl.pl script is run. Before running catctl.pl, queries on any other view or the use of PL/SQL returns an error.

If errors appear listing desupported initialization parameters, then make a note of the desupported initialization parameters and continue with the upgrade. Remove the desupported initialization parameters the next time you shut down the database.

No comments:

Post a Comment