2 Preparing to Upgrade Oracle Database
Before you upgrade Oracle Database, review new features, and carry out procedures to prepare your database for upgrade.
Note:
Oracle strongly recommends that you test the upgrade process and prepare a backup strategy.- Installing Oracle Software in a New Oracle Home
Choose a new location for Oracle Home and then install the new Oracle Database Software for single-instance. - Prepare a Backup Strategy Before Upgrading Oracle Database Using AutoUpgrade
You must design and carry out an appropriate backup strategy to ensure a successful upgrade. - Database Preparation Tasks to Complete Before Starting Oracle Database Upgrades
Ensure that you have completed these database preparation tasks before starting an Oracle Database upgrade. - Enabling Oracle Database Vault After Upgrading Oracle Database
Depending on your target database release, you can be required to reenable Oracle Database Vault, or revoke Oracle Database Vault role granted for upgrade. - Preparations for Running AutoUpgrade Processing Modes
You must complete preparations before you can run an AutoUpgrade processing mode. - Pre-Upgrade Information Check with AutoUpgrade
To obtain a checklist of tasks you must complete before upgrading an Oracle Database, run the AutoUpgrade utility (autoupgrade.jar
) inanalyze
mode. - Create Configuration File for AutoUpgrade
To use AutoUpgrade to complete the upgrade, you first create a configuration file with AutoUpgrade from the new release Oracle home. - Local Parameters for the AutoUpgrade Configuration File
To configure information for specific Oracle Databases for the AutoUpgrade utility upgrade, you provide information in the AutoUpgrade local parameters. - Global Parameters for the AutoUpgrade User Configuration File
To specify a default behavior for a parameter for all Oracle Database upgrades addressed in the configuration file, you can use the optional AutoUpgrade global parameters. - Locally Modifiable Global Parameters for AutoUpgrade Configuration File
Locally modifiable global parameters are parameters that you set both globally, and as you require, set locally, so that you can better control AutoUpgrade job processing. - Understanding Non-CDB to PDB Upgrades with AutoUpgrade
You can upgrade and convert a non-CDB to a PDB as part of an upgrade to a new release in a single operation, or upgrade and then convert an earlier release non-CDB database to a PDB in an existing later release CDB. - Non-CDB to PDB Upgrade Guidelines and Examples
Before conversion, back up your datafiles and database, and follow the guidelines for your source Oracle Database release. - Understanding Unplug-Plug Upgrades with AutoUpgrade
AutoUpgrade can perform an unplug of a pluggable database (PDB) from an earlier release source container database (CDB), plug it into a later release target CDB, and then complete all the steps required to upgrade the PDB to the target CDB release. - Examples of Non-CDB to PDB Configuration Files for AutoUpgrade
Use these examples to understand how you can modify your own Oracle Database upgrade configuration file for AutoUpgrade.
Prepare a Backup Strategy Before Upgrading Oracle Database Using AutoUpgrade
You must design and carry out an appropriate backup strategy to ensure a successful upgrade.
For Oracle Database Enterprise Edition, the primary fallback mechanism is Flashback Database. However, Flashback Database can't be used to revert an unplug-plug upgrade. For unplug-plug upgrades, remove it entirely, or rely on other fallback strategies, such as an RMAN backup.
If you use AutoUpgrade, then Oracle recommends that you specify
target_pdb_copy_option=file_name_convert
, in
the AutoUpgrade configuration file, where
file_name_convert
is a convert pattern prefixed
to the data files. When you do that, AutoUpgrade directs the database to create copies
of the data files before plugging in the database. Choosing to use this method enables
you to use the original database as a fallback. However, be aware that when you create
data file copies, the upgrade requires additional disk space and extra time.
To develop a backup strategy, consider the following questions:
- How long can the production database remain inoperable before business consequences become intolerable?
- What backup strategy is necessary to meet your availability requirements?
- Are backups archived in a safe, offsite location?
- Are backups tested to ensure that they are done properly?
- How quickly can backups be restored (including backups in offsite storage)?
- Have disaster recovery procedures been tested successfully?
Your backup strategy should answer all of these questions, and include procedures for successfully backing up and recovering your database. For information about implementing backup strategies using RMAN, review Oracle Database Backup and Recovery User’s Guide.
In addition, to ensure that you are prepared for a downgrade, review the downgrade chapter and complete any preparation steps you may need to prepare for your release.
Related Topics
Parent topic: Preparing to Upgrade Oracle Database
Pre-Upgrade Information Check with AutoUpgrade
To obtain a checklist of tasks you must complete before upgrading an Oracle
Database, run the AutoUpgrade utility (autoupgrade.jar
) in
analyze
mode.
Oracle recommends that you run AutoUpgrade in -analyze
mode before
you upgrade Oracle Database. AutoUpgrade can identify issues for you to address before
you start your upgrade. In certain cases, AutoUpgrade can also generate scripts that can
resolve some issues.
Tip:
Consider reviewing Mike Dietrich's upgrade blog for tips and suggestions that can assist you with your upgrade preparations.
Parent topic: Preparing to Upgrade Oracle Database
Understanding Unplug-Plug Upgrades with AutoUpgrade
AutoUpgrade can perform an unplug of a pluggable database (PDB) from an earlier release source container database (CDB), plug it into a later release target CDB, and then complete all the steps required to upgrade the PDB to the target CDB release.
There are two workflows for unplug-plug PDB upgrades using AutoUpgrade, depending on how you configure the upgrade:
- You unplug one or more pluggable databases from one source CDB, and plug them into a new release target CDB
- You unplug multiple pluggable databases from different source CDBs, and plug them into a new release target CDB
After the upgrade, for each PDB, you must configure database listeners and
local naming parameters (tnsnames.ora
files).
Caution:
As with any other change to the database, before you run AutoUpgrade to complete the conversion and upgrade, Oracle strongly recommends that you implement a reliable backup strategy to prevent unexpected data loss. There is no option to roll back an unplug-plug PDB upgrade after AutoUpgrade starts this procedure. Flashback Database also does not work across the PDB conversion, and is not reversable. Backups are the only fallback strategy. AutoUpgrade does not support unplug-plug upgrades of PDBs that use Transparent Data Encryption (TDE), or that have an encrypted tablespace.The following illustration shows the unplug-plug operation, in this case of a single PDB:
- There is one source Oracle Database, and one target release Oracle Database. At this
stage, create your configuration file and run AutoUpgrade in Analyze mode
(
autoupgrade.jar -mode analyze
) to check your readiness for upgrade, and to correct any issues that are reported. - You run AutoUpgrade in Deploy mode (autoupgrade.jar -mode deploy). AutoUpgrade uses the information you provide in the configuration file to move the PDB to the target release, and plug in the PDB.
- AutoUpgrade runs prefixups, and then upgrades the PDB to the target release.
Figure 2-1 Unplug-Plug Upgrades from Source to Target

Description of "Figure 2-1 Unplug-Plug Upgrades from Source to Target"
Requirements for Source and Target CDBs
To perform an unplug-plug upgrade, your source and target CDBs must meet the following conditions:
- You have created the target release CDB, and opened the CDB before starting the unplug-plug upgrade.
- The endian format of the source and target CDBs are identical.
- The set of Oracle Database components configured for the target release CDB include all of the components available on the source CDB.
- The source and target CDBs have compatible character sets and national character sets
- The source CDB release must be supported for direct upgrade to the target CDB release.
- External authentication (operating system authentication) is enabled for the source and target CDBs
- The Oracle Application Express installation type on the source CDBs should match the installation type on the target CDB.
- There should be no existing guaranteed restore point (GRP) on the non-CDB Oracle Database that you want to plug in to the CDB.
Note:
With the most recent version of AutoUpgrade, you can now use AutoUpgrade to plug
into an Oracle Data Guard configuration. AutoUpgrade creates the PDB with the
STANDBYS=NONE
clause. After the upgrade, you can
re-establish standbys by recovering the data files on to standby databases.
Features of Unplug-Plug Upgrades
When you select an unplug-plug upgrade, depending on how you configure the AutoUpgrade configuration file, you can use AutoUpgrade to perform the following options during the upgrade:
- You can either keep the PDB name that you have in the source CDB, or you can change the PDB name.
- You can make a copy of the data files to the target CDB, while preserving all of the old files.
- You can copy the data files to the target location, and then delete the old files on the source CDB
- You can process one PDB, or you can link to an inclusion list and process many PDBs in one upgrade procedure; the only limit for the number of PDBs you can process are the server limits, and the limits for PDBS on the CDB.
Example 2-1 AutoUpgrade Configuration File for Unplug-Plug Upgrades
To use the unplug-plug PDB upgrade option, you must identify the following values in the AutoUpgrade configuration file:
- The system identifier parameters for the source CDB (parameter
sid
). - The target CDB (parameter
target_cdb
). - The name of the PDB in the source CDB, and, if you want to convert it, the target conversion name.
For example, where the source CDB is CDB122
, the target CDB is
cdb21x
, the name of the PDB in the source CDB is
pdb2
, and the conversion name for the PDB that you want on the
target CDB is depsales
:
global.autoupg log_dir=/home/oracle/autoupg
upg1.sid=CDB122
upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1
upg1.target_home=/u01/app/oracle/product/21.1.0/dbhome_1
upg1.target_cdb=cdb21x
upg1.pdbs=pdb_2
upg1.target_pdb_name.pdb_2=depsales
upg1.target_pdb_copy_option.pdb_2=file_name_convert=('pdb_2','depsales')
Parent topic: Preparing to Upgrade Oracle Database