2 Preparing to Upgrade Oracle Database

Before you upgrade Oracle Database, review new features, and carry out procedures to prepare your database for upgrade.


Oracle strongly recommends that you test the upgrade process and prepare a backup strategy.

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

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.


Consider reviewing Mike Dietrich's upgrade blog for tips and suggestions that can assist you with your upgrade preparations.

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).


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:

  1. 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.
  2. 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.
  3. 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 follows
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.


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