Oracle 12c offers many new features and upgrading database can bring many advantages to organization. There are various upgrade and migration methods available and the best method to use for your upgrade/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 upon factors there is a method available to best fit your organization needs.
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
Oracle database upgrade to 12c and available methods
1. Oracle Database Upgrade to 12c and Available
Methods
Satishbabu Gunukula, Oracle ACE
• 19+ Years of Experience in Database Technologies and
specialized in high availability solutions.
• Masters Degree in Computer Applications
• Written articles for major publications
• Oracle Certified Professional Oracle 8i,9i,10g
• Oracle Certified Expert Oracle 10g RAC
http://www.oracleracexpert.com
2. Program Agenda
• Why Oracle 12c?
• Upgrade path to Oracle 12c
• Supported Upgrade Paths
• Pre-requisites
• Upgrade Methods & When to consider
– DBUA
– command line
– Full Transportable Export/Import
– Transportable Tablespaces
– Data Pump Export/Import
– Original Export/Import
• Reference
• Q& A
3. Why Oracle 12c
• Oracle Database 12c is designed for the cloud and introduces
Multitenant Architecture with more than 500 new features.
• Multitenant architecture featuring pluggable databases, which makes
it easy to consolidate your databases on to the cloud, deliver high
density of schema based consolidation
• It enables customers to increase utilization of resources, and rapidly
provision and clone database for various purposes by lowering down
of Infrastructure & administrative costs.
4. Upgrade path to Oracle 12c
• Oracle 12c provides to enhanced upgrade automation, the pre-
upgrade and post-upgrade steps have been enhanced by providing fix-
up scripts to reduce the manual work.
• Oracle 12c offers two upgrade options to customers, which is
upgrading to new Multitenant architecture or current architecture.
– Customers have a direct upgrade path from Oracle Database 11g
R1/R2 and Oracle 10g R2.
– Customers who are on Oracle 10g R1 and earlier can use tools
such as Data Pump and GoldenGate to migrate data to Oracle 12c.
6. Pre-requisites
• Run preupgrad.sql from Oracle 12c
– sqlplus/ as sysdba
SQL> $ORACLE_HOME/rdbms/admin/preupgrad.sql
• Results of the checks are located at:
/home/oracle/cfgtoollogs/<SID>/preupgrade/preupgrade.log
• Execute in the SOURCE environment BEFORE upgrade:
/home/oracle/cfgtoollogs/<SID>/preupgrade/preupgrade_fixups.sql
• Execute in the NEW environment AFTER upgrade:
/home/oracle/cfgtoollogs/<SID>/preupgrade/postupgrade_fixups.sql
7. Upgrade Methods
• Available Upgrade Methods
– DBUA
– command line
– Full Transportable Export/Import
– Transportable Tablespaces
– Data Pump Export/Import
– Original Export/Import
8. Upgrade Method: DBUA
• The easiest way to upgrade Oracle Database
• Database Upgrade assistant (DBUA) is a graphical user interface (GUI)
• This method will perform “in place” upgrade and will not create new
copy of the database instance
• DBUA guides you through the database upgrade process and presents
a series of screen that allow you to specify database upgrade options
• Using DBUA user can significantly reduce the amount of manual effort
required
9. Upgrade Method: DBUA
• Plugging a database into a container using DBUA
– After upgrade to Oracle 12c, you can easily plug the database into a CDB
– source database and destination CDB must meet the following requirements:
1. The destination CDB must be created separately, as a new database.
2. The operating system and hardware must have the same endianness.
3. The compatible database options must have installed.
4. The source PDB and destination CDB must have compatible character sets
and national character sets:
o Each character in the source database character set is available in the
target CDB character set.
o Each character in the source database character set has the same code
point value in the target CDB character set.
10. Upgrade Method: DBUA
When to consider DBUA:
– If upgrading Oracle Database in the current hardware
– DBUA is not restartable once the upgrade phase of the process has started
– If you stops the upgrade then you can continue the upgrade using command-line
method
11. Upgrade Method: Command-Line
• This method also easy to upgrade database but manual effort
required
• Oracle 12c introduces new command-line utility (catctl.pl). This utility
replaces catupgrd.sql used in previous versions
• Command-line utility enables parallel processing during the database
upgrade, resulting in better upgrade performance and reduce
database downtime
• Command-Line upgrade follow the same steps and take the same
amount of time as DBUA
• Using DBUA user can significantly reduce the amount of manual effort
required
• From Oracle Database 12c, the Pre-Upgrade Tool (preupgrd.sql)
automatically generates fixup scripts to address common issues
12. Upgrade Method: Command-Line
• Plugging a Database into a CDB Using Command-line Upgrade
– After upgrade to Oracle 12c, you can easily plug the database into a CDB
– source database and destination CDB must meet the following requirements:
1. The operating system and hardware must have the same endianness.
2. The compatible database options must have installed.
3. The source PDB and destination CDB must have compatible character sets
and national character sets:
o Each character in the source database character set is available in the target
CDB character set.
o Each character in the source database character set has the same code point
value in the target CDB character set.
13. Upgrade Method: Command-Line
When to consider DBUA:
• When migrating to new hardware but staying on same operating
system
• The command-line utility has more control from typing commands
than using GIU and many DBA’s prefer this method
• If command-line upgrade is interrupted for any reason, you can rerun
or restart the parallel upgrade utility
14. Upgrade Method: Full Transportable
Export/Import
• Transportable tablespaces is relatively fast way to migrate and
upgrade a database in a single operation
• This method is useful when migrating database to different operating
system or running different version of oracle database
• Transportable tablespaces allows you to copy a set of tablespaces
from one database to another. In addition meta data must be moved
to new database by export/import
• This method is fairly complicated as user responsible copying
metadata
• From Oracle 12c, the new full transportable export/import is much
easier processes for transporting data and meta data from installed
database options
• This method is faster than export/import
15. Upgrade Method: Full Transportable
Export/Import
• Migrating to a Pluggable Database Using Full Transportable
Export/Import
– This method allows to migrate entire database to both new O/S and new Database
release in single operation. So it is useful for migrating to a PDB
– The procedure for migrating PDB is same as NON-PDB
16. Upgrade Method: Full Transportable
Export/Import
When to consider Full Transportable Export/Import :
• Full Transportable Export/Import can be used to migrate source
databases starting Oracle 11g Release 2 (11.2.0.3)
• This method jobs cannot be restarted. In case if the operation is
interrupted then entire job must start from the begging
• This method is subject to the limitations, please refer Oracle Database
Administrator’s Guide for detailed info.
• If O/s and hardware of your source and destination databases have
different endian characteristics, then you need to use RMAN
CONVERT command for each tablespace
17. Upgrade Method: Transportable
Tablespaces
• The transportable tablespaces feature is useful when copy a single
tablespace or a set of tablespaces
• This method requires manual steps and complicated
18. Upgrade Method: Transportable
Tablespaces
Migrating to a Pluggable Database Using Transportable Tablespaces
– Transportable tablespaces can be used to migrate to a PDB.
– The procedure for using transportable tablespaces to migrate a database to a PDB
is the same as migrating a non-PDB.
19. Upgrade Method: Transportable
Tablespaces
When to consider Transportable Tablespaces:
• Oracle recommends to use full transportable export/import to
migrate database from Oracle 11.2.0.3
• Transporting tablespaces between databases is subject to the
limitations, please refer Oracle Database Administrator’s Guide for
detailed info.
• This method can be used to migrate database starting with Oracle 8i
• This method cannot be restated, in case interrupted then entire job
must start from begging
• If O/s and hardware of source and destination databases have
different endian characteristics, you need to use the RMAN CONVERT
command to convert
20. Upgrade Method: Data Pump
Export/Import
• Oracle Data pump export/import can be used within and between
oracle databases
• This method is commonly used to migrate tables, schemas and
databases to new hardware or different O/S, and new release of
Oracle database software
• This data pump is very flexible and easy to use.
• Oracle Data Pump can write data to dump files on disk, or transfer
data from the source to the destination directly over the network
• When data imported it can be transformed to mat the characteristics
of the destination database
• This method is useful when, implementing encryption or
compression, changing BasicFiles LOBs to SecureFiles LOBs, migrating
to a new character set or changing the partitioning of tables in the
database.
21. Upgrade Method: Data Pump
Export/Import
• Migrating to a Pluggable Database Using Oracle Data Pump
– Oracle Data Pump export/import is an easy and flexible way to migrate a database
into a PDB
– This method is useful when source and destination databases uses a different
character set and resides on different O/S or implementing encryption…etc
22. Upgrade Method: Data Pump
Export/Import
When to consider Oracle Data Pump:
– Oracle Data pump method is useful when source and destination databases uses a
different character set and resides on different O/S or implementing
encryption…etc
– Oracle Data pump method available from Oracle 10g
– Data Pump network mode is subject to limitations on network links
23. Upgrade Method: Export/Import
• Oracle recommends to use Data Pump export/import utilities to move
data between Oracle databases.
• The original export/import may be useful when migrating or
upgrading older databases to 12c
24. Upgrade Method: Export/Import
Migrating to a Pluggable Database Using Original Export/Import
– The original Import utility is still fully supported for migrating older Export dump
files into newer versions of Oracle Database.
– You can export an older database using the original Export utility, and then import
that database into a PDB using the original Import utility.
– This method helps to consolidate databases from old and even obsolete platforms
into a CDB.
25. Upgrade Method: Export/Import
When to consider Export/Import:
– Migrating a database using original export/import can be quite time consuming.
– Original export is de-supported for general use from Oracle Database 11g.
– The only supported use of original Export in Oracle Database 11g is backward
migration of XMLType data to Oracle Database 10g release 2 (10.2) or earlier.
27. Summary
• Oracle 12c offers many new features and upgrading
database can bring many advantages to organization.
There are various upgrade and migration methods
available and the best method to use for your
upgrade/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 upon factors there is a
method available to best fit your organization needs.