Gavin - Upgrade and Migrate To Oracle Database 12c Release 2
Gavin - Upgrade and Migrate To Oracle Database 12c Release 2
How will any of the new features benefit the business or application end users??
Database Upgrade/Migration
Planning
Step-by-Step Strategy
Piecemeal to mitigate risks learn as we go
Big-Bang Strategy
All in one single downtime window
Sometimes necessary due to dependencies
Upgrade downtime allowable will very often dictate upgrade method to be used
Can your database applications users afford to withstand a limited amount of time
with only read-only access to the database being migrated?
Upgrade and Migration Methods
Transportable
Transportable Transportable
Transportable Transient RMAN Cross
RMAN Cross
Expdp/impdp
Expdp/impdp Platform
Platform GoldenGate
GoldenGate
Tablespaces
Tablespaces Databases
Databases Logical Standby
Inc. Backups
Inc. Backups
Oracle 10.2
Oracle 10.2 Oracle 10.2
Oracle 10.2 Oracle 10.2
Oracle 10.2 Oracle 10.2
Oracle 11.1
Oracle 11.1 Oracle 11.1
Oracle 11.1 Oracle 11.1
Oracle 11.1 Oracle 11.1
Oracle
Oracle Oracle
Oracle Oracle
Oracle Oracle
11.2.0.2
11.2.0.2 11.2.0.2
11.2.0.2 11.2.0.2
11.2.0.2 11.2.0.2
Oracle
Oracle Oracle
Oracle Oracle
Oracle Oracle
Oracle Oracle Oracle
11.2.0.3/4
11.2.0.3/4 11.2.0.3/4
11.2.0.3/4 11.2.0.3/4
11.2.0.3/4 11.2.0.3/4
11.2.0.3/4 11.2.0.3/4 11.2.0.3/4
Oracle
Oracle Oracle
Oracle Oracle
Oracle Oracle
Oracle Oracle Oracle
12.1.0.1/2
12.1.0.1/2 12.1.0.1/2
12.1.0.1/2 12.1.0.1/2
12.1.0.1/2 12.1.0.1/2
12.1.0.1/2 12.1.0.1/2 12.1.0.1/2
Oracle 12c upgrades are faster!
Faster upgrades in 12c Direct upgrade supported versions
Runs database upgrade scripts in parallel
Reduced downtime for upgrades
Note : DBUA no hardware change (old and new homes need
to be present)
Prioritise upgrades for PDBs within a CDB
Most critical PDB upgraded first and available first
If DBUA failure, first attempt command line upgrade before
restoring!
DBUA and Manual Upgrade
$ORACLE_HOME/perl/bin/perl catctl
-n 8 l /home/orcl catupgrd.sql
Create a new PDB in the destination 12c CDB using the create pluggable database
command
Set the user and application tablespaces in the source database to be READ ONLY
Export from the source database using expdp with the FULL=Y, VERSION=12.0 and
TRANSPORTABLE=ALWAYS
Copy the dump file and data files for tablespaces containing user/application data to the
destination
Create a directory object in the destination PDB pointing to the folder containing
dumpfile
Using an account that has the DATAPUMP_IMP_FULL_DATABASE privilege, import into the
target database using impdp with the FULL=Y and TRANSPORT_DATAFILES parameters
Restore the user tablespaces in source database to read/write mode
RMAN Cross Platform Incremental
Backups
Both Transportable Tablespaces/Databases have a large downtime
component when tablespaces are in read-only mode
Simplify the platform migration and minimize read-only down time
on the source database using incremental based approach
Reduce downtime by 8 times versus traditional migration
approaches
Supports cross platform conversion either on source or on target
Initial copy of the datafiles occurs while the source database
remains online.
RMAN Cross Platform Incremental Backups
Transfer source datafiles to the destination (source database
remains online)
Convert datafiles to new endian format if required
Create an incremental backup of the source tablespaces
Transfer the incremental backup to the destination
Convert the incremental backup to new endian format if required
Apply the incremental backup to the destination database
RMAN Cross Platform Incremental
Backups
Repeat the incremental backup steps as needed
Place the source database into read only mode outage starts only now
Take one last incremental backup, copy, apply and recover on target
Export metadata from the source
Import metadata on the destination
Make tablespaces on destination read/write
Rolling upgrade using
Transient Logical Standby
Start with the 11.2.0.4 Data Guard physical standby database and convert
that to a transient logical standby database. Users are still connected
to primary database
Upgrade the transient logical standby database to 12.1.0.1
The transient logical standby process uses SQL Apply to take redo
generated by a database running a lower Oracle version (11.2.0.4) , and
apply the redo to a standby database running on a higher Oracle version
(12.1.0.1)
Perform a switchover so that the original primary database now becomes
a physical standby database
Use Redo Apply to synchronize (and upgrade) the original primary
database with the new upgraded primary database
Perform another switchover to revert the databases to their former roles
Rolling upgrade using
Transient Logical Standby
Database Rolling Upgrade Shell Script (Doc ID 949322.1) download
script physru
$physru <sysdba user> <primary TNS alias> <physical standby TNS alias>
<primary db unique name> <physical standby db unique name> <target version>
Manual steps required by the DBA
Install Oracle 12c software on both primary and standby sites
Upgrade the standby database using DBUA or manual upgrade.
Start the upgraded standby database in the new Oracle 12c home
Start the original primary database in the new Oracle 12c home
Rolling upgrade using
Transient Logical Standby
First execution
Create control file backups for both the primary and the target physical
standby database
Creates Guaranteed Restore Points (GRP) on both the primary database and
the physical standby database that can be used to flashback to beginning of
the process or any other intermediate steps along the way
Use SQL apply to synchronize the transient logical standby database and make it
current with the primary
Performs a switchover to the upgraded 12c transient logical standby and the
standby database becomes the primary
Starts Redo Apply on the new physical standby database (the original
primary database) to apply all redo that has been generated during the
rolling upgrade process, including any SQL statements that have been
executed on the transient logical standby as part of the upgrade
Feedback/Questions to:
[email protected]