Oracle 12c to 19c upgrade using AutoUpgrade Method

In this blog, we will see how to upgrade Oracle Database 12c to 19c using AutoUpgrade Tool

What is the AutoUpgrade?

  • The Oracle Database AutoUpgrade utility is a small command-line tool that allows you to upgrade your databases very easily with very little interaction
  • The new AutoUpgrade utility in Oracle 19¢ performs almost 99% of the task by itself, we just have to provide inputs during the initial phase
  • So it performs Prechecks against multiple databases, upgrades multiple databases in one go
  • Also, it does Post upgrade, object recompilation, and time zone up-gradation
  • The only thing you need to provide is a contig file in text format

Which database releases are supported?

  • As a source, the minimum version is Oracle Database 11.2.0.4. onwards

Download the latest auto-upgrade jar file

  • Auto upgrade utility autoupgrade.jar file exists by default under $ORACLE_HOME/rdbms/admin directory of Oracle 19c Home
  • Oracle strongly recommends downloading the latest AutoUpgrade version before doing the upgrade
  • You download the most recent version from MOS Note: 2485487.1  AutoUpgrade Tool
  • Once you download this jar file transfer it to the Server and create a new directory and place this file in that directory

cp -r autoupgrade.jar /u01/app/oracle/product/19.0.0/db_1/rdbms/admin/

Java version:

  • Java version should be 8 or later, which is available by default in Oracle Database homes from release 12.1.0.2 and latest

Create the config file

  • Create New Directory Which will contain your config file and logs
  • mkdir /home/oracle/auto_upgrade_19c

Run Below command to create sample config file which we will use to make final config file.

  • cd /home/oracle/auto_upgrade_19c
  • $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -create_sample_file_config
  • cp sample_config.cfg prod_db_config.cfg
  • Make necessary changes

Modify the config file according to your env

prddb_config.cfg file should have following entry which specifies source and target database home location and DB name and log locations and other information’s:

global.autoupg_log_dir=/home/oracle/auto_upgrade_19c/upg_logs
upg1.dbname=PRDDB
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/12.2.0.1/db_1
upg1.target_home=/u01/app/oracle/product/19.0.0/db_1
upg1.sid=PRDDB
upg1.log_dir=/home/oracle/auto_upgrade_19c/upg_logs/PRDDB
upg1.upgrade_node=orclagent.localdomain
upg1.target_version=19.12
upg1.run_utlrp=yes
upg1.timezone_upg=yes

Analyze the database using modified config file

Auto upgrade Analyze mode checks your database to see if it is ready for the upgrade. This will reads data from the database and does not perform any updates.

Execute AutoUpgrade in analyze mode with the below syntax:

export ORACLE HOME=/u01/app/oracle/product/19.0.0/db_1
export PATH=$PATH:$ORACLE_HOME/jdk/bin

cd /home/oracle/auto_upgrade_19c

$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config prddb_config.cfg -mode ANALYZE

We can monitor, manage and control the jobs from the autoupgrade console.

  • lsj – to list the jobs
  • status – to show the job status
  • tasks – shows the tasks executing

Crosscheck and verify all logs before proceeding further

Deploy the upgrade and monitor

  • Auto upgrade Deploy mode performs the actual upgrade of the database from pre-upgrade source database analysis to post-upgrade checks.
  • Before starting Deploy make sure you have taken a backup of your database.

$ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar -config
prod_db_config.cfg -mode DEPLOY

  • Once the upgrade process is started consider monitoring the logs and database alert logs to see the progress of the upgrade. Auto upgrade logs are available under

/home/oracle/auto_upgrade_19c/upg_logs/

Once the upgrade finishes crosscheck the below.

SELECT VERSION FROM V$TIMEZONE_FILE;
select name, open_mode, version, status from v$database, v$instance;

Post-upgrade task

  • Once the upgrade is successful and all testing is done, drop the restore point.
  • Drop the Guaranteed restore point

select name from v$restore_point;
drop restore point restorepoint_name;

  • Change the compatible parameter
  • After the upgrade, the database has to be tested properly before updating the compatible parameter. Once the parameter is updated database cannot be downgraded.

show parameter compatible;
alter system set compatible=’19.0.0′ scope=spfile;
shutdown immediate:
startup;
show parameter compatible;

Hope this blog was useful…

Please find out all of our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

 

19C UPGRADE METHODS ALL IN ONE

UPGRADE METHODS :

AUTO UPGRADE SAME SERVER – NEW FEATURE

CDB & PDB USING MANUAL UPGRADE

MANUAL UPGRADE NON CDB

12C TO 19C DBUA UPGRADE

12C TO 19C UPGRADE USING DATAPUMP

12C TO 19C GRID UPGRADE

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter : https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

AutoUpgrade 21c Release: New Features/Enhancements

Belong to Below environment:

Oracle Database – Enterprise Edition – Version 12.2.0.1 and later
Oracle Database – Standard Edition – Version 12.2.0.1 and later

Overview:

Oracle Database AutoUpgrade allows DBAs to upgrade one or many databases without human intervention, all with one command and a single configuration file.

Advantages:

AutoUpgrade enables customers to upgrade one or many Oracle databases at the command-line with a single command and a single configuration file. AutoUpgrade will run the preupgrade tasks, perform automated fixups where needed, execute the database upgrade, and finish by taking care of post-upgrade tasks. It includes automatic retry and fallback, the possibility to schedule upgrades for future points in time, and the ability to set, change or remove initialization parameters as desired. It saves time and money by upgrading hundreds of databases with one command and replacing bespoke high maintenance upgrade solutions.

Download

The most recent version of AutoUpgrade can be downloaded via this link: version 20201214.

Supported Target Versions

AutoUpgrade Tool can be used on upgrading to below Oracle Database releases:

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

How to Install

As of the January 2019 Release Updates (DBJAN2019RU) and beyond, AutoUpgrade Support is available for Oracle Database 12c Release 2 (12.2) and Oracle Database 18c (18.5) target homes. For both Oracle Database 12c Release 2 (12.2) and Oracle Database 18c (18.5) target homes, you must download the AutoUpgrade Tool and place it under $ORACLE_HOME/rdbms/admin.

In Oracle Database 19c (19.3) and later target Oracle homes, the autoupgrade.jar file exists by default. However, before you use AutoUpgrade, Oracle recommends that you download the latest version and replace the one already existing under $ORACLE_HOME/rdbms/admin.

Limitations

  • Database restoration option is not available on an Oracle Database Standard Edition.

AutoUpgrade 21c Release: New Features/Enhancements

  • Non-CDB to PDB Upgrades
    • AutoUpgrade can upgrade and convert a non-CDB to a PDB in a new CDB in a single operation, or upgrade and then convert a Non-CDB database to a PDB in a pre-existing CDB
    • Support for RAC and SI databases
  • Unplug-plug upgrade
    • 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
  • Supports RAC upgrades (Only for Linux or Unix-based systems)
    • Configuration of the RAC management system in the source and target home is automated
    • Supports native file systems, ASM and ACFS
    • Oracle Restart
    • Pluggable databases are supported in a RAC environment
  • Ability to pass catctl_options (via config file)
    • This enables the DBA to control the level of parallelism for a specific upgrade.
  • Restore capability
    • AutoUpgrade restore job option allows the DBA to restore database back to source home if upgrade failed or succeeded
  • Clear the recovery for a specific job by adding clear_recovery_data on the command line and use jobs parameter to specific exactly which jobs recovery data must be cleared.
  • Upgrades on Data Guard environments
    • AutoUpgrade can detect Oracle Data Guard configurations, and defer shipping logs to standby databases configured for the primary database. It will also detect and defer shipping logs to standby database if the deployment is configured manually. Upon a successfully upgrade of the primary database, upgrades to the standby database must be performed and monitored by the DBA.
  • AutoUpgrade performance improvements
    • utlrp compilations moved out of upgrade into a post fixup
    • Improved resume operations: AutoUpgrade keeps track and skips over PDBs databases that have been upgraded successfully
    • Replay support was added for upgrades 21 or higher
  • AutoUpgrade supports upgrade on CDBs with proxy pdbs
  • AutoUpgrade supports upgrade on CDB’s with application containers
  • Added additional JSON status information
  • Integrated classic pre-upgrade functionality
    • The -preupgrade clause of AutoUpgrade replaces the functions previously performed by the manual Pre-Upgrade Information Tool (preupgrade.jar) in previous releases The -mode clause takes one of three values:
      • analyze: Check your system for readiness to upgrade
      • fixups: Perform fixups as needed on your source Oracle Database release in preparation for upgrade
      • postfixups: Perform fixups on your target Oracle Database release after upgrade is completed.
      • Reports are identical to what the preupgrade.jar originally produced.
  • Starting Oracle Release 21c, Enterprise Manager, DBUA and ORAchk use AutoUpgrade to perform database upgrade readiness.
  • Starting Oracle Release 21c, FPP performs database upgrades using AutoUpgrade
  • Enhanced management of databases using Transparent Data Encryption (TDE)

Reference oracle support Doc id :  2485457.1

Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter : https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8