0% found this document useful (0 votes)
214 views20 pages

Oracle Database Upgrade Methods

The document discusses several methods for upgrading an Oracle database from an older version to Oracle 19c with minimal downtime, including: 1. Using the Oracle AutoUpgrade tool or command-line upgrade utility, which automates the upgrade process. 2. Performing a manual command-line upgrade, which allows more direct control but follows the same steps. 3. Using transportable tablespaces or Oracle Data Pump export/import to migrate data between databases. 4. Leveraging Oracle GoldenGate for rolling upgrades to replicate transactions and keep databases in sync during an upgrade.

Uploaded by

hassan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
214 views20 pages

Oracle Database Upgrade Methods

The document discusses several methods for upgrading an Oracle database from an older version to Oracle 19c with minimal downtime, including: 1. Using the Oracle AutoUpgrade tool or command-line upgrade utility, which automates the upgrade process. 2. Performing a manual command-line upgrade, which allows more direct control but follows the same steps. 3. Using transportable tablespaces or Oracle Data Pump export/import to migrate data between databases. 4. Leveraging Oracle GoldenGate for rolling upgrades to replicate transactions and keep databases in sync during an upgrade.

Uploaded by

hassan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 20

Oracle Database Upgrade

Methods
To Oracle 19c
By
Muhammad Hassan Moeen
What upgrade method should I follow if I upgrade from
an older version to the newest version before Upgrade
some important point to be noted.

• Do you need to upgrade to the latest version and release?


• Reasons why your organization may have a Version -1 Policy
• Determining the right upgrade path for you
• Learn about known issues after choosing your upgrade path
• Learn about the issues fixed in the latest release
• Never upgrade your production database directly
• Oracle Recommends manual Upgrade because it gives us control on every step.
There are about a dozen ways to upgrade your database,
both conventional and unconventional
The different methods of the upgrade process

• Plug and Unplug Upgrade (Down time Required)


• Auto Upgrade Tool (Down time Required)
• Database Upgrade Assistant (DBUA) (Down time Required)
• Manual Command-line Upgrade (DB upgrade) (Minimal Down time Required)
• Transportable Tablespaces (Down time Required)
• Data Pump export/import (Down time Required)
• Oracle Golden Gate (Zero Down time Required)
Comparison of the different upgrade methods: 
Do tools matter?
• Regardless of which tools you choose, AutoUpgrade, dbugrade or the DBUA: The
database upgrade process underneath the covers is always exactly the same. catctl.pl
will utilize catcon.pm and drive the upgrade in parallel wherever possible.

Does size matter?


• Size clearly doesn’t matter for the duration of an upgrade. Whether it is 40TB or just 40GB, the
upgrade usually doesn’t touch data.
• There are very rare exceptions, for instance in the past we have seen a situation where SPATIAL data
needed a refresh. And of course, then it mattered if you really used Spatial Data Option, or not. And
the time zone adjustment is a special candidate.
Method 1: Oracle AutoUpgrade Tool or Command-line Upgrade
AUTOUPGRADE

• The recommended and easiest way to upgrade to Oracle Database 19c is to upgrade your existing database using
the Oracle Auto Upgrade Tool. Because this method can act on your database without creating a copy or a new
instance, this is sometimes referred to as upgrading “in place.”
• The Auto Upgrade Tool automates the upgrade process for Oracle Database releases 11.2.0.4 and higher to 19c
and higher. (Releases 18.5 and 12.2 are supported targets as well.) Using a single command and one configuration
file, Auto Upgrade analyzes one or more source database(s) and applies fixups, performs the upgrade, and
completes post upgrade checks and configuration migration. Auto Upgrade is fully restart able and uses parallel
capabilities (catctl.) It supports all operating systems running Oracle Database servers, both Enterprise Edition and
Standard Edition 2, and Real Application Cluster (RAC) database upgrades.
• Auto Upgrade supports non-CDB and CDB upgrades as well as non-CDB to PDB conversions. In the case of a
non-CDB to PDB upgrade, the config file specifies the location of the pre-created CDB. Autopage plugs in the
PDBs and performs the upgrade and non-CDB to PDB
conversion in one pass.
Method 2: MANUAL COMMAND-LINE UPGRADE

• Oracle Database 19c uses the command-line upgrade utility (catctl.pl/dbupgrade). The command-line upgrade
utility, like AutoUpgrade and DBUA, enables parallel processing during the database upgrade, resulting in better
upgrade performance and reduced database downtime.
• Command-line upgrades follow the same steps and take the same amount of time as upgrading with DBUA.
They are most commonly used by database administrators (DBAs) who desire more direct control, or in situations
where a database is being moved to a new hardware server in conjunction with their database upgrade.
• The Pre-Upgrade Information Tool (preupgrade.jar) automatically generates fixup scripts to address common
issues that may prevent an upgrade from being successful. The post-upgrade phase has also been enhanced to
automate the running of many post-upgrade steps.
Method 2 : Example of Using Command-line Upgrade

• The process of upgrading your Oracle database using command-line upgrade can be broken into three phases, each of which has a small number of steps
to follow for a successful upgrade.
⚫ Pre-upgrade Phase

⚫ Run the new Pre-Upgrade Information Tool (preupgrade.jar), which validates the readiness of your database to be upgraded
⚫ Run the preupgrade_fixups.sql script to automatically address issues found by the Pre-Upgrade Information Tool
⚫ Perform any manual fixup steps identified by the Pre-Upgrade Information Tool
⚫ Upgrade Phase
⚫ Run the Parallel Upgrade Utility (catctl.pl)
⚫ Post-upgrade Phase

⚫ Run the postupgrade_fixups.sql script to automatically fix any issues identified by the Pre-Upgrade Information Tool, which need to be addressed
after the upgrade.
⚫ Review the log files generated by the Parallel Upgrade Utility
⚫ Recompile invalid objects by running utlrp.sql
⚫ Plug into a CDB
⚫ Use the DBMS_PDB.DESCRIBE() procedure to generate an XML descriptor file for your database

⚫ Connect to the CDB and issue the CREATE PLUGGABLE DATABASE command to migrate your non-CDB database into a PDB
⚫ Run the noncdb_to_pdb.sql script to convert the non-CDB into a fully usable PDB
• If your source database contains either encrypted tablespaces or tables with encrypted columns, then the keys associated with those tablespaces or tables
must be moved from the source database into the new PDB using the export and import functions of the Oracle Database ADMINISTER KEY
MANAGEMENT SQL statement
Method 2 : Considerations for Using Database Upgrade Assistant
• DBUA is described in the Oracle Database Upgrade Guide. In general, DBUA can only be used when upgrading your Oracle
database on its current hardware system. This is because DBUA performs the pre-upgrade validation steps using the source
Oracle home, and then switches to the destination Oracle home to perform the upgrade and post-upgrade steps.
• DBUA does not give the user any control over the degree of parallelism used to upgrade the database.
• While DBUA does automate many of the pre-upgrade tasks identified in the database pre-upgrade scripts, there are some
actions which may still require manual intervention.
Method 3: Full Transportable Export/Import or Transportable
Tablespaces

• Transportable tablespaces allows you to copy a set of tablespaces from one database
to another. This can be much faster than exporting and importing data from those
tablespaces because the tablespaces are copied as physical files without the need to
interpret the logical entities, such as rows or indexes, contained within those files. In
addition to copying the tablespaces, metadata describing the objects within the source
database must be moved to the new database by Data Pump export/import.
Method 4: Oracle Data Pump Export/Import

• Oracle Data Pump provides high-speed movement of data and metadata within and
between Oracle databases. Because they are extremely flexible and easy to use, the
Oracle Data Pump export (expdp) and import (impdp) utilities are commonly used
to migrate tables, schemas, and databases to new hardware servers, to different
operating system platforms, and to new releases of Oracle Database software.

• Oracle Data Pump can write data to dump files on disk, or it can transfer data from
the source database to the destination directly over the network. When the data is
imported, it can be transformed to match the characteristics of the destination
database. Some interesting ways in which a database can be transformed upon
import include migrating to a new character set, implementing encryption or
compression, changing BasicFiles LOBs to SecureFiles LOBs, or changing the
partitioning of tables in the database.
Method 4: Oracle Data Pump Export/Import

• Oracle Data Pump provides high-speed movement of data and metadata within and
between Oracle databases. Because they are extremely flexible and easy to use, the
Oracle Data Pump export (expdp) and import (impdp) utilities are commonly used
to migrate tables, schemas, and databases to new hardware servers, to different
operating system platforms, and to new releases of Oracle Database software.

• Oracle Data Pump can write data to dump files on disk, or it can transfer data from
the source database to the destination directly over the network. When the data is
imported, it can be transformed to match the characteristics of the destination
database. Some interesting ways in which a database can be transformed upon
import include migrating to a new character set, implementing encryption or
compression, changing BasicFiles LOBs to SecureFiles LOBs, or changing the
partitioning of tables in the database.
Method 5: Oracle Golden Gate upgrade

• organizations can upgrade or migrate from 11g to Oracle Database 12c and 19c
without downtime.
• Using Oracle Golden Gate's real-time data integration and replication capabilities,
businesses can perform rolling upgrades, keep transactions in sync across the
databases, manage partial or phased migrations and upgrades and implement a
reliable failback strategy.
• Oracle Golden Gate can be used to reduce the downtime for numerous types of
migrations and upgrades, including application upgrades, database upgrades,
switching storage or hardware infrastructures, and even endian changes; however
the focus of this paper is upgrading the database.
Method 5: Oracle Golden Gate upgrade

• Upgrading to Oracle Database 12c using Oracle Golden Gate consists of the
following high-level steps:
1. Set up a standby database running the previous database software version using an
existing database backup.
2. Upgrade the standby database to Oracle Database 12c.
3. Synchronize the standby database with the production database.
4. Test in active/live mode.
5. Switch over the application to the standby database.
6. Upgrade the primary database to Oracle Database 12c after comprehensive
application testing at standby.
CONCLUSION

• The different tools, techniques, and utilities provided by Oracle to help you upgrade
and migrate to Oracle Database 19c, as well as guidance and information to help
you choose among the various upgrade and migration methods available.
• The best method to use for your migration scenario depends on the source database
version, the source and destination operating systems, your downtime requirements,
and the personal preference of the DBA. Based on these factors, there is a method
available that is the best fit for your migration scenario.
• If you would like to achieve the minimum possible downtime for your database
upgrade or migration, you can start by choosing the fastest upgrade or migration
method based on your source and destination platform and Oracle Database release.
Recommendations

• If your Organization can afford minimal down time then you should go with oracle
best practices like Oracle manual Upgrade , DBUA Upgrade and Auto Upgrade.
• In case you are doing cross plate form migration and upgrade without having any
down time then you should go with Oracle Golden Gate solution. It is bit complex
way of upgrade but its Zero downtime migration and Upgrade with cross plate form
facility.
Bonus :- Database Rolling Upgrade and Switch Over to Logical
Standby Database
• A rolling upgrade allows you to perform database upgrade without having any
noticeable downtime to the end users. There are multiple ways to perform rolling
upgrade. But you must identify which one will work for your environment.
• Once Primary and Logical Standby is in synchronization and you do not see any
unsupported events in DBA_LOGSTDBY_EVENTS, Upgrade the logical standby
database following Oracle upgrade documents. Restart SQL apply to synchronize
the data changes that might have happened on the primary database while the
logical database was being upgraded. Plan and prepare for minimal downtime on
Primary to switchover to a logical standby database that is your new Primary.
Bonus :- Database Rolling Upgrade and Switch Over to Logical
Standby Database

• Method 1: Transient logical standby database


1. Convert existing physical standby to logical standby using KEEP IDENTITY clause
2. Upgrade Logical standby first
3. Return the Logical standby back to physical standby
• Method 2: DBMS_ROLLING_UPGRADE package
1. Only available from 12c
2. Its automation of transient logical standby process
Thank You For Your Attention!

You might also like