Showing posts with label oracle database upgrade. Show all posts
Showing posts with label oracle database upgrade. Show all posts

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:




January 25, 2018


Database Migration and Upgrade from Oracle 11g to 12c.


Hello Friends, hope you are doing well.

I recently did a database migration to new hardware/servers and then upgraded from 11.2.0.4 to 12.1.0.2.
For this migration and upgrade activity, followed the below approach to minimize the downtime as possible.

This migration and upgrade activity can be broadly split into two phases.

1.       Migrate the database to new hardware/servers. (e.g. OS version RHEL 6.x to 7.x)
2.       Upgrade the database from 11g to 12c

1.       Migrate the database to new servers
·         Setup two node Oracle 12c cluster in new servers

The below Oracle document can be referred to know how to setup Oracle 12c Cluster in new servers:

·         Install RDBMS software 11.2.0.4 in new servers.
This 11g Oracle home is needed to setup physical standby database first for migrating the 11g database from old server to this new server.

·         Setup a Physical standby database 11.2.0.4 in new servers so that both the databases in old and new servers are in synch with Data guard replication

The below Oracle document can be referred to know how to create Oracle 11g physical standby database and how to perform database switchover (Database role transitions):

·         During the change window, activate physical standby database so that it will become primary database (Read and Write mode).

·         Now the 11g database is up and running in new servers

2.       Upgrade database from 11g to 12c in new servers
·         Install Oracle 12c RDBMS software in new servers.

·         Now upgrade this 11.2.0.4 database to 12c, in new servers (This 11g database has been migrated to this new servers as explained in above steps).
     By default upgraded database will be Non-CDB.

The below Oracle document can be referred to know how to upgrade the database to Oracle 12c:



References:
·    Oracle 12c Grid Infrastructure Installation and Upgrade Guide

·    Oracle 12c Database Upgrade Guide, for upgrading database to 12c

·      Oracle 11gR2 - Data Guard Concepts and Administration