Pre-Upgrade Information Tool and AutoUpgrade Preupgrade

Learn how to obtain the same features previously offered through the Pre-Upgrade information tool (preupgrade.jar) by using AutoUpgrade with the preupgrade clause.

Starting with Oracle Database 21c, the Pre-Upgrade Information Tool is no longer offered. All features that you previously obtained using the Pre-Upgrade Information Tool are now offered using the AutoUpgrade tool

Using AutoUpgrade To Obtain Pre-Upgrade Information Tool Checks

Learn how to obtain the same system checks you obtained previously through the Pre-Upgrade Information Tool (preupgrade.jar) by using the AutoUpgrade utility.

To see how to use AutoUpgade to perform a check you performed in the past using the Pre-Upgrade Information tool, review the comparison table that follows, and review the examples in this topic.

For full details about how to use the AutoUpgrade utility to perform checks and run scripts, refer to the topic Preupgrade under "AutoUpgrade Command Line Parameters."

Table B-2 Comparison of Preupgrade and Postupgrade Checks

Check Pre-Upgrade Information Tool AutoUpgrade
Check source Oracle Database release readiness for upgrade Run preupgrade.jar for database checks. The generated file upgrade.xml shows check results. Run AutoUpgrade with the preupgrade parameter, run in analyze mode. Obtain results from upgrade.xml, which is located in the directory Log_dir/database_name/job_number/prechecks/.
Obtain and run scripts to fix some issues found in the source Oracle Database to prepare for upgrade. Run preupgrade.jar to obtain scripts (preupgrade_fixups.sql and preupgrade_fixups_pdbname.sql), which you run manually using SQL*Plus Run Autoupgrade with the preupgrade parameter, run in fixups mode. AutoUpgrade runs all database checks, and on the basis of those results, runs fixups automatically.
Obtain and run scripts to perform some postupgrade fixes on the upgraded Oracle Database Run preupgrade.jar to obtain scripts (postupgrade_fixups.sql and postupgrade_fixups_pdbname.sql), which you run manually using SQL*Plus Run Autoupgrade with the preupgrade parameter, run in postfixups mode. AutoUpgrade runs all database checks, and on the basis of those results, runs postfixups automatically.

Related Topics

Examples of Preupgrade and Postupgrade Checks

Review the upgrade scenario examples to understand the differences between the Pre-Upgrade Information Tool and AutoUpgrade using the preupgrade parameter.

In the examples that follow, consider the following configurations:

  • Source: Oracle Database 12c Release 2 (12.2.0.1) Enterprise Edition
  • Oracle home: /u01/app/oracle/product/12.2.0/dbhome_1
  • Oracle System Identifier (SID): db122
  • Target: Oracle Database 19c for the Pre-Upgrade Information Tool, and Oracle Database 21c for AutoUpgrade using the preupgrade parameter
  • Target release Oracle home for Pre-Upgrade Information Tool: /u01/app/oracle/product/19.0.0/dbhome_1
  • Target release Oracle home for AutoUpgrade using the preupgrade parameter: /u01/app/oracle/product/21.0.0/dbhome_1

Example B-1 Non-CDB Upgrade Database Checks Using AutoUpgrade Preupgrade Parameter

Previously, when you used the Pre-Upgrade Information Tool, to run all database prechecks, you completed steps in this order:

  1. Run setenv ORACLE_HOME /u01/app/oracle/product/12.2.0/dbhome_1
  2. Run setenv ORACLE_SID db122
  3. Switch directory to the target Oracle home: /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin
  4. Run the Pre-Upgrade Information Tool:, directing output to a directory: java –jar preupgrade.jar dir /user/log
  5. Check the upgrade.xml file in the log directory
  6. Find preupgrade_fixups.sql and postupgrade_fixups.sql in the log directory you specified (/user/log/cfgtoollogs/db122/preupgrade).

Now, with the AutoUpgrade tool using the preupgrade parameter, you run steps in this order:

  1. Run setenv ORACLE_HOME /u01/app/oracle/product/12.2.0/dbhome_1
  2. Run setenv ORACLE_SID db122
  3. Run java -jar autoupgrade.jar -preupgrade "target_version=21,dir=/autoupgrade/test/log"
  4. Check upgrade.xml under the directory /autoupgrade/test/log/db122/100/prechecks

Example B-2 Non-CDB Upgrade Running Prefixups Using AutoUpgrade Preupgrade Parameter

Previously, when you used the Pre-Upgrade Information Tool, to run prefixups on your source database, you completed steps in this order:

  1. Change directory to the source Oracle home: /u01/app/oracle/product/12.2.0/dbhome_1
  2. Start SQL*Plus
  3. Using SQL*Plus, run preupgrade_fixups.sql generated in the directory you specified (/user/log/cfgtoollogs/db122/preupgrade)
  4. Check fixups results from the SQL*Plus output.

Now, with the AutoUpgrade tool using the preupgrade parameter, you run preupgrade fixups as follows:

  1. Run setenv ORACLE_HOME /u01/app/oracle/product/12.2.0/dbhome_1.
  2. Run setenv ORACLE_SID db122.
  3. Run java -jar autoupgrade.jar -preupgrade "target_version=21,dir=/autoupgrade/test/log" –mode fixups. The scripts run automatically.
  4. Check prefixups.xml under the directory /autoupgrade/test/log/db122/102/prefixups.

Example B-3 Non-CDB Upgrade Running Postupgrade Fixups Using AutoUpgrade Preupgrade Parameter

Previously, when you used the Pre-Upgrade Information Tool, to run postupgrade fixups on your source database, you completed steps in this order:

  1. Start SQL*Plus under the source Oracle Home: /u01/app/oracle/product/12.2.0/dbhome_1
  2. Using SQL*Plus, run postupgrade_fixups.sql generated in the directory you specified (/user/logcfgtoollogs/db122/preupgrade).
  3. Check fixups results from SQL*Plus output.

Now, with the AutoUpgrade tool using the preupgrade parameter, you run postupgrade fixups as follows:

  1. Run setenv ORACLE_HOME /u01/app/oracle/product/12.2.0/dbhome_1.
  2. Run setenv ORACLE_SID db122.
  3. Run java -jar autoupgrade.jar -preupgrade "target_home=/u01/app/oracle/product/21.0.0/dbhome_1,dir=/autoupgrade/test/log" –mode postfixups
  4. Check postfixups.xml under directory /autoupgrade/test/log/db122/102/postfixups.

Example B-4 Comparison of Output Examples for Pre-Upgrade Information Tool and AutoUpgrade

The following is an example of the output generated by running prechecks with the Pre-Upgrade Information tool (using Oracle Database 19c as the target release), and AutoUpgrade using the Pre-Upgrade Information Tool (using an upgrade to Oracle Database 21c). Note that you are required to run scripts manually after the script completes:


[oracle@localhost preupgrade]$ java -jar /databases/product/19c/dbhome_1/rdbms/admin/preupgrade.jar \
xml dir /autoupgrade/test/preupgrade
==================
PREUPGRADE SUMMARY
==================
 /autoupgrade/test/preupgrade/upgrade.xml
 /autoupgrade/test/preupgrade/preupgrade_fixups.sql
 /autoupgrade/test/preupgrade/postupgrade_fixups.sql
Execute fixup scripts as indicated below:
Before upgrade:
Log into the database and execute the preupgrade fixups
@/autoupgrade/test/preupgrade/preupgrade_fixups.sql
After the upgrade:
Log into the database and execute the postupgrade fixups
@/autoupgrade/test/preupgrade/postupgrade_fixups.sql
Preupgrade complete: 2020-07-06T16:35:14
 

 

The following is an example for running AutoUpgrade with the preupgrade parameter using analyze mode, with the target release Oracle Database 21c.

[oracle@localhost /autoupgrade]$ java -jar autoupgrade.jar -preupgrade "target_version=21,dir=/autoupgrade/test/log" -mode analyze
AutoUpgrade tool launched with default options
Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be analyzed
Type 'help' to list console commands
upg> Job 102 completed
------------------- Final Summary --------------------
Number of databases [ 1 ]
Jobs finished successfully [1]
Jobs failed [0]
Jobs pending [0]
------------- JOBS FINISHED SUCCESSFULLY -------------
Job 102 for db122