March 11, 2022

Oracle's AutoUpgrade Utility

The AutoUpgrade utility helps to upgrade one or many Oracle databases with a single command and single configuration file.

In this blog, explaining how to upgrade Oracle databases from 12.2 to 19.3 release using "AutoUpgrade" utility.

Benefits of AutoUpgrade:


  • The AutoUpgrade helps to upgrade one or many databases without human intervention, all with one command and a single configuration file.
  • The AutoUpgrade utility is designed to automate the upgrade process - It identifies issues before upgrade. It performs pre and post upgrade actions. It performs database upgrades and starts the upgraded Oracle databases.
  • It enables to schedule upgrades for future points in time
  • It enables to set, change or remove initialization parameters as desired
  • It enables you to call the custom scripts during the upgrade to configure databases.

Target Versions Supported:

The AutoUpgrade utility can be used to upgrade Oracle databases to below listed target versions:

  • Oracle Database 21c (21.3 and newer)
  • Oracle Database 19c (19.3 and newer)
  • Oracle Database 18c (18.5 and newer)
  • Oracle Database 12c Release 2 (12.2 + DBJAN2019RU and newer)


AutoUpgrade Modes: 

The steps that AutoUpgrade runs to upgrade the database depends on the processing mode that you select.

  • Analyze Mode: Setup, Prechecks.
  • Fixups Mode: Setup, Prechecks, and Prefixups.
  • Deploy Mode: Setup, guaranteed restore point (GRP), Preupgrade, Prechecks, Prefixups, Drain, DB (database) Upgrade, Postchecks, and Postupgrade. You can run your own scripts before the upgrade (Preupgrade stage) or after the upgrade (Postupgrade stage), or both before and after the upgrade.
  • Upgrade Mode: Setup, DB (database) Upgrade, Postchecks, and Postfixups.


Autoupgrade - Steps


        1. Download and install the Oracle 19.3 software binaries.


I have already installed Oracle 19.3 software. 


2. Verify Java version. 


The AutoUpgrade Utility requires Java 8. 


[oracle@localhost ~]$ $ORACLE_HOME/jdk/bin/java -version


java version "1.8.0_201"

Java(TM) SE Runtime Environment (build 1.8.0_201-b09)


Note - Oracle_home is the Target Oracle Database home. 


          3. Download the latest AutoUpgrade version

  • The autoupgrade.jar file exists by default, in Oracle Database 19c (19.3) and later targets Oracle homes. Oracle strongly recommends downloading the latest AutoUpgrade version from My Oracle Support Document 2485457.1.
  • The autoupgrade.jar file exists in the $ORACLE_HOME/rdbms/admin directory. 
  • For both Oracle Database 12c Release 2 (12.2) and Oracle Database 18c (18.5) target homes, you must download the AutoUpgrade kit from My Oracle Support Document 2485457.1.
  • Run below command to verify AutoUpgrade version:

[oracle@localhost admin]$ cd $ORACLE_HOME/rdbms/admin


[oracle@localhost admin]$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -version


Note - Oracle_home is the Target Oracle Database home. 



  • Download the latest autoupgrade.jar file from My Oracle Support Document 2485457.1. Replace “autoupgrade.jar” which is already present in $ORACLE_HOME/rdbms/admin directory, with latest downloaded file.
  • Now run below command to verify AutoUpgrade version. 

It should be latest version as below:


[oracle@localhost admin]$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -version



        4. Create the Configuration file as below. AutoUpgrade configuration files contain all the information required to perform Oracle Database upgrades.



        5. Run Autoupgrade in Analyze mode to start analysis.


$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config /u01/app/oracle/admin/autoupgrade/config.txt -mode analyze



        6. The main commands to monitor the Autoupgrade jobs, from Autoupgrade console are as below:


lsj – Lists the jobs by status

status – Lists the status of a particular job or all jobs

tasks – Displays the tasks that are running.


        7. Review the analysis Summary report.


            8. Once Autopgrade in Analyze mode completed successfully, run Autoupgrade in Deploy mode to start the database upgrade process as below:


$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config /u01/app/oracle/admin/autoupgrade/config.txt -mode deploy




            9. Review the AutoUpgrade log files for any errors


    10. Databases upgraded from 12.2 to 19.3 successfully, using the Autoupgrade tool.
            

         Connect to databases and verify.  


         The Autoupgrade tool updates the new target Oracle home in “/etc/oratab” for all upgraded databases.


                    Database 1:


                           Database 2: