Upgrading Manually with Parallel Upgrade Utility
To run upgrades with scripts that you run and manage manually, you can use
the Parallel Upgrade Utility (catctl.pl
).
- About the Parallel Upgrade Utility for Oracle Database (CATCTL.PL and DBUPGRADE)
The Parallel Upgrade Utility (catctl.pl
, and thedbupgrade
script) enable you to upgrade simultaneously components that do not require upgrades to occur in a specific order. - General Steps for Running the Parallel Upgrade Utility
Review to obtain an overview of how to use the Parallel Upgrade Utility for Oracle Database. - Parallel Upgrade Utility (catctl.pl) Parameters
Control how the Parallel Upgrade Utility (catctl.pl
) runs. You can also use these arguments to run thedbupgrade
shell command. - Example of Using the Parallel Upgrade Utility
Use this example to understand how you can run the parallel upgrade utility manually to perform upgrades.
About the Parallel Upgrade Utility for Oracle Database (CATCTL.PL and DBUPGRADE)
The Parallel Upgrade Utility (catctl.pl
, and the dbupgrade
script) enable you to upgrade simultaneously components that do not require upgrades to occur in a specific order.
Oracle Database 12c release 1 (12.1) introduced the Parallel Upgrade Utility, catctl.pl
. This utility reduces the total amount of time it takes to perform an upgrade by loading the database dictionary in parallel, and by using multiple SQL processes to upgrade the database. Performing parallel upgrades of components enables you to take advantage of your CPU capacity. Oracle continues to make improvements to the upgrade process to simplify both manual upgrades, and upgrades performed with the Database Upgrade Assistant (DBUA). DBUA and the manual upgrade procedures take advantage of the new Parallel Upgrade Utility.
You can run a shell command, dbupgrade
, which starts up catctl.pl
from the command line, instead of requiring you to run it from Perl.
The dbupgrade
shell command is located in the file path $ORACLE_HOME/bin
on Linux and UNIX, and %ORACLE_HOME%\bin
on Windows. You can provide any command arguments that are valid for catctl.pl
to the shell command. Either run the command directly from the new Oracle home path, or set a user environment variable to point to the file path.
For example:
Running with default values:
$ ./dbupgrade
Running to specify a log directory placed in /tmp
:
$ ./dbupgrade -l /tmp
You can also run the Parallel Upgrade Utility using priority lists. For example:
$ ./dbupgrade -L priority_list_name
When you use a priority list, you can include or exclude a specific list of PDBs in your upgrade.
$ ./dbupgrade -E
Related Topics
Parent topic: Upgrading Manually with Parallel Upgrade Utility
General Steps for Running the Parallel Upgrade Utility
Review to obtain an overview of how to use the Parallel Upgrade Utility for Oracle Database.
The Parallel Upgrade Utility (catctl.pl
,
which you can start with the shell command dbupgrade
)
loads the data dictionary and components in parallel. Loading in parallel reduces
the overall upgrade time. Before running the Parallel Upgrade Utility, follow the
procedures for backing up your database that you normally do before upgrading. Also,
as a prerequisite, you must run AutoUpgrade using the preupgrade
clause to identify any problems that a database administrator must address before
the upgrade proceeds.
The general steps for upgrading your database with the Parallel Upgrade Utility are as follows:
- Back up your current database.
- Install the Oracle Database software for the new release.
-
Run AutoUpgrade with the
preupgrade
parameter on the source database, and correct any issues that AutoUpgrade does not fix. - Shut down your current database.
- Set up the new Oracle home environment to access the new release
database software, and then start SQL*Plus from the directory
ORACLE_HOME/rdbms/admin
. - Log in to a user account with
SYSDBA
system privileges, and connect to the database that you want to upgrade:CONNECT / AS SYSDBA
-
Start the database in upgrade mode. Use the command for your configuration type.
SQL> startup upgrade; SQL> alter pluggable database all open upgrade;
Note:
The
UPGRADE
keyword performs operations that prepare the environment for the upgrade.You can be required to use the
PFILE
option in your startup command to specify the location of your initialization parameter file.When you start the database in upgrade mode, only queries on fixed views execute without errors until after the
catctl.pl
script is run. Before you runcatctl.pl
, you receive an error if you try to use PL/SQL, or if you try to run queries on any other view.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.
-
Exit SQL*Plus.
-
Run the Parallel Upgrade Utility from the new Oracle home.
You can run the utility as a shell command (
dbupgrade
on Linux and Unix, anddbupgrade.cmd
on Microsoft Windows) or you can run it as a Perl command (catctl.pl
).For example, on Linux and Unix:
cd $ORACLE_HOME/bin ./dbupgrade
For example, on Microsoft Windows:
cd %ORACLE_HOME%\bin dbupgrade
The Parallel Upgrade Utility starts the upgrade process.
Note:
The Parallel Upgrade Utility uses other files to carry out the upgrade. On Linux and Unix systems, these files include
catconst.pm
,catcom.pm
,sqlpatch
,sqlpatch.pl
orsqlpatch.pm
, andorahome
on Linux/UNIX systems. On Windows systems, these files includeorahome.exe
. Do not change or remove these files.
Related Topics
Parent topic: Upgrading Manually with Parallel Upgrade Utility
Parallel Upgrade Utility (catctl.pl) Parameters
Control how the Parallel Upgrade Utility (catctl.pl
) runs. You can also use these arguments to run the dbupgrade
shell command.
Note:
The shell command utility dbupgrade
starts catctl.pl
. The dbupgrade utility resides in the ORACLE_HOME/bin
directory. You can use the shell command utility to start the Parallel Upgrade Utility at the command prompt. You can either run the utility using default values, or you can use catctl.pl
input parameters to specify Parallel Upgrade Utility arguments.
Table 4-1 Parallel Upgrade Utility (catctl.pl) Parameters
Parameter | Description |
---|---|
|
Specifies a space-delimited inclusion list for PDBs that you want to upgrade. For example, in an Oracle Multitenant deployment with PDB1, PDB2, PDB3, and PDB4, include PDB1 and PDB2, but exclude the PDBs not named. PDB 1 and PDB 2 are upgraded, but PDB 3 and PDB4 are not upgraded. Linux and UNIX (use single quotes):
Windows (use double quotes):
|
|
Specifies a space-delimited exclusion list for PDBs that you want to upgrade. For example, in an Oracle Multitenant deployment with PDB1, PDB2, PDB3, and PDB4, you can use an exclusion list to exclude PDB1 and PDB2, but include the PDBs not named. PDB1 and PDB2 are not upgraded, but PDB3 and PDB4 are upgraded. Linux and UNIX (use single quotes):
Windows (use double quotes):
Note:
|
|
Specifies the location of the directory containing the files that you want processed. |
|
Sets echo OFF while running the scripts. The default is echo ON. |
|
Enables you to run an upgrade emulation. You can use the To carry out an upgrade emulation, complete all upgrade preparations before you run the Parallel Upgrade Utility, and then run the command using When you run the Parallel Upgrade Utility with the |
|
Forces a cleanup of previous upgrade errors. Non-CDB databases require only the |
|
Specifies an identifier to use when creating spool log files. |
|
Specifies the location for the directory to use for spool log files. The default location is Oracle strongly recommends that you do not write log files to the |
|
Upgrades PDBs using a priority list during an Oracle Database upgrade, and specifies the priority list name. The priority list updates priority status in the database during 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. |
|
Keeps CDB$ROOT in UPGRADE mode while the PDBs are upgraded. For non-CDBs, this parameter is ignored. During CDB upgrades, using this parameter setting places the CDB and all its PDBs in upgrade mode, which can reduce total upgrade time. However, you cannot bring up any of the PDBs until the CDB and all its PDBs are upgraded. By default, if you do not use the |
|
Specifies the number of processes to use for parallel operations. Non-CDBs: The Multitenant architecture databases (CDBs): The number of PDBs upgraded concurrently is controlled by the value of the Values for the Non-CDBs: The maximum value for Multitenant architecture databases (CDBs): The maximum value for |
|
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. |
|
Restarts from the specified phase. When you re-run an upgrade, it does not restart phases already completed successfully. |
|
Stops from the specified phase. |
|
Resumes the upgrade from a failed phase. Using the |
|
Names the SQL script that initializes sessions. |
|
Specifies serial upgrade instead of parallel. Starting with Oracle Database 12.2, |
|
Takes offline user schema-based table spaces. |
|
Specifies user name, and prompts for password. |
|
Displays phases only. |
|
Turns on production debugging information for |
|
Turns on debug tracing information for For example, to set the number to 1, enter -Z 1. |
Parent topic: Upgrading Manually with Parallel Upgrade Utility
Example of Using the Parallel Upgrade Utility
Use this example to understand how you can run the parallel upgrade utility manually to perform upgrades.
The Parallel Upgrade Utility (catctl.pl
) is integrated
with AutoUpgrade and DBUA. The catctl.pl
Perl script uses classic
upgrade to upgrade CDB$ROOT
. You can also run the Parallel Upgrade
Utility manually by using the command-line script dbupgrade
. Run the Parallel Upgrade Utility using the command-line
parameters to specify how you want the upgrade to run. For example, to run the
utility in serial mode instead of using parallel operations, specify the -n 1
option.
Example 4-6 Running Parallel Upgrade Utility with Parameters for CDB and Non-CDB Databases
If you use the option -n 4
when you run the Parallel Upgrade Utility, then the upgrade process creates catupgrd0.log
, catupgrd1.log
, catupgrd2.log
, and catupgrd3.log
. Check all of the catupgrd
#.log
files to confirm that the upgrade succeeded. If the upgrade failed, and you fix issues and run the Parallel Upgrade Utility again, then the previous log files are overwritten, unless you specify a different log directory by using the -l
parameter.
For example:
cd $ORACLE_HOME/bin
dbupgrade -n 4 -l $ORACLE_HOME/diagnostics
Example 4-7 Running Parallel Upgrades on Multiple Pluggable Databases (PDBs) Using Parallel Upgrade Utility
These examples show how parameter settings change the way that the Parallel Upgrade Utility performs the upgrade on multiple PDBs.
Note:
-
The
CDB$ROOT
defaults to a minimum value of 4 SQL processes, and to a maximum value of 8 -
The default value for
-N
is 2. -
PDB$SEED
always counts as one (1) PDB in the upgrade cycles -
The default for the Parallel Upgrade Utility parameter
-n
is the value of theCPU_COUNT
parameter
In the following examples, the system is an Oracle Multitenant Oracle Database system
that has a CPU_COUNT
value of 24.
Run the Parallel Upgrade Utility without specifying values for the parameters
-n
and -N
(that is,
accept the default value of -N, which is 2, and accept the default value of
-n
as the CPU_COUNT
parameter value, which is
24). The following parallel processing occurs:
-
12 PDBs are upgraded in parallel (
CPU_COUNT
divided by 2) -
2 parallel processes run for each PDB
Specify the value of -n
as 64, and -N
as 4. The following parallel processing occurs:
-
16 PDBs are upgraded together (64 divided by 4)
-
4 parallel processes run for each PDB
Specify the value of -n
as 20, and -N
as 2. The following parallel processing occurs:
-
10 PDBs are upgraded together (20 divided by 2)
-
2 parallel processes run for each PDB
Specify the value of -n
as 10, and -N
as 4. The following parallel processing occurs:
-
2 PDBs are upgraded together (10 divided by 4), rounded down.
-
4 parallel processes run for each PDB
Do not specify the value of -n
(that is, accept the default value
of -n
, which is the value of the CPU_COUNT
parameter), and specify the value of -N
as 1. The
following parallel processing occurs:
-
24 PDBs are upgraded together (
CPU_COUNT
value divided by 1) -
1 process runs for each PDB
Specify a value for -n
as 20, and do not specify the value for -N
(that is, accept the default value of -N
, which is 2). The following parallel processing occurs:
-
10 PDBs are upgraded together (20 divided by 2)
-
2 parallel processes run for each PDB
Parent topic: Upgrading Manually with Parallel Upgrade Utility