Oracle 12c upgrade, speeding up the apex part

Let’s have a look at what part of oracle upgrade process takes most of the time. This is test environment with very simple database created from the oltp template.

Notice that Oracle server takes 22 minutes to upgrade and APEX part takes 54.59 minutes! We don’t want to waste almost 1h of production downtime window.

upgrade2

It would be nice to switch this part completely off, the most fastest way to do something is to not to do it at all. However I didn’t find a supported way to skip this part yet.

The workaround is to install the newest version of APEX beforehand.

After instaling the APEX from here: http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html, the upgrade time looks much better. The APEX part completely been skipped.

upgrade3

 

Oracle 12c Upgrade: How to adjust the number of parallel threads

Starting from 12c, the upgrade script catctl.pl runs in parallel. We can use -n option to adjust the number of threads of the process. It looks like that by default it takes the number of cpu available.

<br />Analyzing file catupgrd.sql
Log files in /u01/app/oracle/product/12.1.0.2/rdbms/admin
catcon: ALL catcon-related output will be written to catupgrd_catcon_4747.lst
catcon: See catupgrd*.log files for output generated by scripts
catcon: See catupgrd_*.lst files for spool files, if any
Number of Cpus        = 4
SQL Process Count     = 0
New SQL Process Count = 4

Setting high value could produce more contention that benefit. This is something we need to test before production. To set the number of threads, -n option is used. In this example I use 1 thread only.

<br />$ORACLE_HOME/perl/bin/perl catctl.pl -n 1 catupgrd.sql

Argument list for [catctl.pl]
SQL Process Count n = 1
SQL PDB Process Count N = 0
Input Directory d = 0
Phase Logging Table t = 0
Log Dir l = 0
Script s = 0
Serial Run S = 0
Upgrade Mode active M = 0
Start Phase p = 0
End Phase P = 0
Log Id i = 0
Run in c = 0
Do not run in C = 0
Echo OFF e = 1
No Post Upgrade x = 0
Reverse Order r = 0
Open Mode Normal o = 0
Debug catcon.pm z = 0
Debug catctl.pl Z = 0
Display Phases y = 0
Child Process I = 0

catctl.pl version: 12.1.0.2.0
Oracle Base = /u01/app/oracle

Analyzing file catupgrd.sql
Log files in /u01/app/oracle/product/12.1.0.2/rdbms/admin
catcon: ALL catcon-related output will be written to catupgrd_catcon_6258.lst
catcon: See catupgrd*.log files for output generated by scripts
catcon: See catupgrd_*.lst files for spool files, if any
Number of Cpus = 4
SQL Process Count = 1

The Oracle 12c upgrade workshop virtual environment

The great option for those who want to get into 12c upgrade as fast as possible is to look at Oracle provided virtual box environment with pre-configured linux os and 11g and 12c installations.

The virtual machine could be obtained from

http://www.oracle.com/technetwork/community/developer-vm/vts-hol-2415742.html

There are 8 zip files with total size of 15GB required to be downloaded from the internet.

You must have 30GB free space to store and unzip them, and  about 75GB of storage for virtual machine disks.

The 4 tasks could be performed here:

  1. Upgrade the 11g into 12c using common approach of running new perl script
  2. Using transportable databases to migrate to 12c
  3. Moving the database between homes
  4. Explore 12c and its new features

upgrade_workshop

Thanks to Roy Swonger and Mike Dietrich from Oracle for a great work!