Oracle Database 12c Release 1 (12.2) Upgrade New Features
Oracle Database – Enterprise Edition – Version 188.8.131.52 to 184.108.40.206 [Release 12.2]
Information in this document applies to any platform.
To describe the new upgrade features for Oracle Database 12c Release 1 (12.2)
Automatic setting of user table_spaces to Read-Only during upgrades
From 12.2 we can now set user tablespace to Read-Only mode before upgrade . After the upgrade, the tablespaces are changed back automatically to READ/WRITE. This option helps to minimize upgrade downtime
Manual: Use -T option with parallel upgrade utility – dbupgrade/catctl.pl to set user tablespaces automatically to READ-ONLY during an upgrade.
$dbupgrade –T -l $ORACLE_HOME/diagnostics
DBUA: Use DBUA to set user tablespaces to read only mode during upgrade as shown
Automatic catuppst.sql Script Run During Upgrade
The catuppst.sql script is now executed automatically after an upgrade is completed.
Automatic Resume After Failed Upgrades
We can now resume a failed database upgrade from the failed phase, after we have resolved the issue causing the upgrade failure in the background. This feature can be used in both DBUA and manaul upgrade
Manual Upgrade: Run the Parallel Upgrade Utility using the -R parameter to resume the upgrade at the point of failure, so that only the missing upgrade phases are rerun
-R : Resumes the upgrade from a failed phase so that only the missing upgrade phases are rerun.
$ORACLE_HOME/perl/bin/perl catctl.pl -R -l $ORACLE_HOME/cfgtoollogs catupgrd.sql
$dbupgrade -R -l $ORACLE_HOME/diagnostics
DBUA: We can resume failed database upgrade by using “RETRY” Option provided by DBUA. Note: This option works only if the DBUA screen is up and running.
Parallel Upgrade Utility Command Line Changes
From Oracle Database 12c release 2 (12.2), we can execute the Parallel Upgrade Utility directly from the command line by using a shell script dbupgrade. dbupgrade script is under $ORACLE_HOME/bin. Set all required environment variables to 12.2 binaries before running dbupgrade
Set appropriate environment variables
$ cd $ORACLE_HOME/rdbms/admin
Running to specify a log directory placed in /tmp:
$ dbupgrade -l /tmp
- Parallel Upgrade Utility Parameters -n and -N
– n Specifies the number of processes to use for parallel operations.
Non-CDBs: The maximum value for -n is 8. The minimum value is 1. The default value is 4.
Multitenant architecture databases (CDBs): The maximum value for -n is unlimited. The minimum value is 4.
– N : Specifies the number of SQL processors to use when upgrading PDBs.
For non-CDBs, this parameter is ignored.
For CDBs, the maximum value is 8. The minimum value is 1. The default value is 2
The Parallel Upgrade Utility parameters -n and -N together control the maximum number of PDB that can be concurrently upgraded . The maximum PDB upgrades running concurrently is the value of -n divided by the value of -N
-n 4 specifies that the upgrade allocates four processes to perform parallel upgrade operations.
-N 2 specifies that the upgrade runs two SQL processors to upgrade the PDBs.
-n/-N =4/2 = 2
Determines that upgrade runs no more than two concurrent PDB upgrades.
$dbupgrade –n 4 –N 2 –l $ORACLE_HOME/cfgtoollogs
$ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -N 2 catupgrd.sql
Parallel Upgrade Utility Upgrade Emulation Tests (Parameter -E)
From 12.2 we can run upgrade in emulation mode with the Parallel Upgrade Utility, which enables you to perform an upgrade emulation to test Parallel Upgrade Utility parameter settings. To carry out an upgrade emulation, complete all upgrade preparations before you run the Parallel Upgrade Utility, and then run the command using -E.
-E : Enables to run an upgrade emulation.
$ dbupgrade –E –l $ORACLE_HOME/cfgtoollogs
$ $ORACLE_HOME/perl/bin/perl catctl.pl -E catupgrd.sql
Pre-Upgrade Information Tool Script Changes
The Pre-Upgrade Information Tool script preupgrd.sql and utluppkg.sql are no longer supplied as part of the 12.2 release. The Pre-Upgrade Information Tool preupgrade.jar replaces both of these files
* Set your user environment variables to point to the source database home
* Open all the pluggable databases
SQL> alter pluggable database all open;
$ORACLE_HOME/jdk/bin/java -jar /u01/app/oracle/product/12.2.0/rdbms/admin/preupgrade.jar TERMINAL TEXT
Prioritize PDB upgrades
From 12.2 we can set priority for PDB upgrades, so that higher priority PDBs are upgraded first. This feature can be used in both DBUA and manaul upgrade
Manual: Priority based upgrades can be done using parallel upgrade utility(dbupgrade/catctl.pl) with ‘-L’ parameter
-L : Upgrades PDBs using a priority list during an Oracle Database 12.2 upgrade. The priority list updates priority status of the pdbs during database upgrade. This priority listing is maintained in future upgrades
By default the CDB$ROOT and PDB$SEED databases are always processed first. They are processed first even if they are not added to a priority list.
All PDBs in the priority list are processed before PDBs not in the priority list
$ dbupgrade –L plist.txt –l $ORACLE_HOME/cfgtoollogs
$ $ORACLE_HOME/perl/bin/perl catctl.pl -L plist.txt -l $ORACLE_HOME/cfgtoollogs catupgrd.sql
DBUA: From 12.2 DBUA provides us an option to prioritize PDB upgrades .
Parallel upgrade utility with inclusion and exclusion list
We can perform database upgrade using inclusion list -c option and exclusion list -C .
-c : Specifies a space-delimited inclusion list for PDBs that you want to upgrade
Linux and UNIX : -c ‘PDB1 PDB2‘ Windows : -c “PDB1 PDB2“
-C : Specifies a space-delimited exclusion list for PDBs that you want to upgrade.
Linux and UNIX : -C ‘PDB1 PDB2’ Windows : -C “PDB1 PDB2“
- Example for inclusion List :
dbupgrade –c ‘PDB1’ –l /tmp
$ORACLE_HOME/perl/bin/perl catctl.pl –c ‘pdb1’ <pdb2_name>’ catupgrd.sql
- Example for exclusion list :
dbupgrade –C ‘pdb1’ –l /tmp
$ORACLE_HOME/perl/bin/perl catctl.pl –C ‘pdb1’ catupgrd.sql