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). You must also configure
Oracle Wallet management.
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. 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 4-2 Unplug-Plug Upgrades from Source to Target
Description of "Figure 4-2 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.
Caution:
Do not use AutoUpgrade to perform an unplug-plug upgrade to a CDB that is part of an Oracle Data Guard configuration. To upgrade a PDB using an unplug-plug to a CDB with an Oracle Data Guard configuration, you must perform the upgrade manually using the procedure described in the following My Oracle Support note:
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 4-3 AutoUpgrade Configuration File for Unplug-Plug Upgrades
To use the unplug-plug PDB upgrade
option, you must set the system identifier parameters for the source CDB and PDB,
parameter target_cdb
in the AutoUpgrade configuration file. The
target_cdb
parameter value defines the Oracle system identifier
(SID) of the container database into which you are plugging the non-CDB Oracle
Database. For
example:
global.autoupg_log_dir=/home/oracle/autoupg
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_version=21.1.0
upg1.target_cdb=cdb21x
upg1.target_pdb_name.pdb_2=depsales
upg1.target_pdb_copy_option.pdb_2=file_name_convert=('pdb_2','depsales')
Parent topic: Using AutoUpgrade for Oracle Database Upgrades