Upgrade,
Migrate &
Consolidate
to Oracle Database 12c
Roy Swonger & Mike Dietrich
Database Upgrade and Utilities

Oracle C...
Introduction & Overview

General Preparation Steps
Upgrade & Migration Cases
Fallback Strategies
New Features in Oracle 12...
Database Upgrade Development Group
Roy Swonger
Senior Director Software Dev.
&

Product Management

Carol Tagliaferri
Seni...
Some MAGIC Questions
Question?

Answer

Change to new hardware?
Change to new operating system architecture?
Change the ch...
Terminology
 Database Upgrade
– A database upgrade is called "Upgrade" because the data dictionary

will get upgraded to ...
Lifetime Support Policy
today

2025

2024

2023

2022

2021

2020

2019

2018

2017

2016

2015

2014

2013

2012

(GA: Ju...
Lifetime Support Policy


http://www.oracle.com/us/support/lifetime-support/index.html
and Note: 209768.1 for Support Pol...
Database Patch Set Roadmap
 Release Schedule of Current Database Releases Note.742060.1

– Note.742060.1 contains also in...
Upgrade Companion
 Note:1462240.1 Upgrade Companion 12c (coming soon)
−

Note:785351.1 Upgrade Companion 11.2

Copyright ...
Upgrade OTN Page
 http://otn.oracle.com/goto/upgrade
 http://www.oracle.com/technetwork/database/upgrade/index.html

Cop...
Maximum Availability Architecture OTN
 http://otn.oracle.com/goto/maa
 http://www.oracle.com/technetwork/database/featur...
Upgrade Blog: blogs.oracle.com/UPGRADE

Scroll
down
to go
to the
slides

Copyright © 2013, Oracle and/or its affiliates. A...
INTERNAL PPT DOWNLOAD ONLY
http://database.us.oracle.com
‘click’

Copyright © 2013, Oracle and/or its affiliates. All righ...
Is It Time To Upgrade?

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migrate and Consoli...
Upgrade and Migration Paths
UPGRADE/MIGRATION

exp/imp, expdp/impdp
CTAS, COPY, SQL Loader

N

Stay on same OS?

Y

N
SQL ...
Strategies?
 Step-by-Step vs Big Bang
– Upgrade/migration in pieces over a period of time
 Considered as risk mitigating...
Introduction & Overview

General Preparation Steps
Upgrade & Migration Cases
Fallback Strategies
New Features in Oracle 12...
Make sure everything is in good shape ...
 So that you don’t go off the rails!

Copyright © 2013, Oracle and/or its affil...
Preparation Checklist
 In the SOURCE environment:
Clean Up






Empty the recycle bin
Check for INVALID objects in S...
Clean Up: Recycle Bin
 Especially before patch or release upgrade purge the

recycle bin:
– SQL> purge DBA_RECYCLEBIN;

...
Clean Up: Invalid Objects
 Always check for INVALID objects
 SQL> select unique OBJECT_NAME, OBJECT_TYPE,
OWNER from DBA...
Clean Up: Duplicate Objects
 Always check for DUPLICATE objects in SYS/SYSTEM
 SQL> select OBJECT_NAME, OBJECT_TYPE from...
Clean Up: Parameters
 Remove outdated parameters, underscores and events

from your init.ora/spfile
– Example:

_always_s...
Clean Up: Parameters
Real World Crosscheck

 Internal Oracle production database
– Multimedia (ORDIM) component took very...
Components: Validation Check
 Make sure all components are VALID before upgrade
– SQL> select substr(COMP_ID, 1,10) compi...
Components: Necessary Components
 General recommendation:
– Standardize the set of installed database components througho...
Components: Removal
 3 potential reasons to remove components:
– A component does not exist anymore in Oracle Database 12...
Performance: Preserve Statistics
 Gather accurate performance statistics from production
– Accurate means: Starting at le...
Performance: Network Bandwidth
 Theoretical vs Real World network transfer rates:
Interface

Data
Volumne

Theoretical
Tr...
Performance: Network Strategies




Move archived data in advance
If data files include lots of free space, export/impo...
Optional: Integrity Checks
 Health Check (hcheck.sql)
– Download hcheck.sql from MOS Note:136697.1
– This script will che...
Preparation Check List
 In the TARGET environment:
Checks

 Software Certification Information
 Installation Requiremen...
Certification Check
 Verify platform certification in My Oracle Support
– Please see Note: 964664.1 and Note:431578.1 for...
Software Download
 How to access the software?
– Get the latest patch set (if there's one available)!
 http://support.or...
Installation of the new Software
Patch Set /
Base Release

 Install newest PATCH SET
(full install release since Oracle D...
Example: Patch Set 11.2.0.3
 Download patch set 11.2.0.3 from support.oracle.com:

Copyright © 2013, Oracle and/or its af...
Patch Set Installation 11.2.0.3
 Default: out-of-place patch upgrade!!! It’s a full release!!!
– If you specify an in-pla...
Patch Set Installation 11.2.0.3
 Patch set 11.2.0.3 is a full release
– Therefore no need anymore to install 11.2.0.1 fir...
Unattended Installation/Configuration
 Oracle 11.2 – see Note:885643.1
– SAVE RESPONSEFILE option in OUI available
– Or: ...
Unattended Installation/Configuration
 Oracle Database 12c:



Copyright © 2013, Oracle and/or its affiliates. All righ...
Patching Notes Flow in MOS
Check for:

MOS
Note:161818.1
» Click on the releases
number «

MOS
Note:880782.1
Known Issues
...
Important Alerts and One-Off-Patches?
 Check for important alerts: Note:161818.1

‘click’

Copyright © 2013, Oracle and/o...
Upgrade Information / Alerts
 Known issues in 11.2.0.x? See Note:880782.1

‘click’

Copyright © 2013, Oracle and/or its a...
Upgrade Information / Alerts
 Recommended Patches for 11.2.0.3? Note:1348336.1
− See also Recommended Database Patches No...
Recommended Patches: PSUs
 Install the latest PSU as well
– Note:854428.1: Introduction to Database Patch Set Updates
– N...
Upgrade Information / Alerts
 Alerts and new issues with 11.2.0.3? Note:1348336.1

Copyright © 2013, Oracle and/or its af...
Upgrade Information / Alerts
 Alerts and new issues with 11.2.0.3? Note:1348336.1

Copyright © 2013, Oracle and/or its af...
Important Optimizer Issues and Fixes
 Things to consider before upgrade to Oracle Database 11.2.0.3 to

avoid Poor Perfor...
Recommended OS patches
 MOS Note:169706.1: OS Installation and Configuration

Copyright © 2013, Oracle and/or its affilia...
Standby-First-Patching
 Oracle Data Guard Standby-First Patch Apply
– MOS Note:1265700.1 - Data Guard Standby-First Patch...
Parameter Recommendations
 General guidelines:
– The fewer parameters you have in your spfile, the better
– Remove outdat...
Parameter Recommendations - Info
 June 6, 2012
https://www.pcworld.com/article/257045/6_5m_linkedin_passwords_posted_onli...
Parameter Recommendations - Info
 March 3, 2013:
http://www.huffingtonpost.com/2013/03/03/evernote-hacked-50-million-pass...
Parameter Recommendations
 SEC_CASE_SENSITIVE_LOGON=TRUE
– Enables or disables password case sensitivity
– Default TRUE s...
Parameter Recommendations
sqlnet.ora

 SQLNET.ALLOWED_LOGON_VERSION_SERVER
– Determines minimum authentication protocol a...
Parameter Recommendations
 AUDIT_TRAIL
– Enables or disables database auditing
– Attention:

New Unified Auditing can be ...
Parameter Recommendations
 DEFERRED_SEGMENT_CREATION
– Newly created tables will just allocate segments when a first row
...
Parameter Recommendations
 _OPTIMIZER_COST_BASED_TRANSFORMATION
– See MOS Note: 1082127.1 for more details on CBQT


CBQ...
Parameter Recommendations
 SESSION_CACHED_CURSORS
– Default: 50
– Cursor caching mechanism was changed in Oracle 10.2.0.4...
Parameter Recommendations
 _DATAFILE_WRITE_ERRORS_CRASH_INSTANCE=TRUE
– Default: TRUE
– For write errors to ANY data file...
Parameter Recommendations
 MAX_STRING_SIZE
– Values: STANDARD, EXTENDED
– Controls the maximum size of VARCHAR2, NVARCHAR...
New Parameters in Oracle Database 12c





















CELL_OFFLOADGROUP_NAME
CONNECTION_BROKERS
D...
Deprecated and Obsolete Parameters
 Deprecated in Oracle Database 12c:
– sec_case_sensitive_logon

 Obsolete in Oracle D...
Introduction & Overview

General Preparation Steps
Upgrade & Migration Cases

Upgrade 32/64bit

Fallback Strategies
New Fe...
Case 1: Upgrade to Oracle Database 12c
 Database upgrade including migration to a new server
Example Facts & Description
...
Case 1: Upgrade to Oracle Database 12c
 Database upgrade including migration to a new server

Install and
patch
Oracle 12...
Upgrade to Oracle Database 12c
Oracle
7.3.4
Oracle 7.3
(GA: 1996)

Oracle 8.0
(GA: 1997

Oracle 8.1
(GA: 1998)

Oracle
8.0...
What's new in upgrades to Oracle 12c?
 New SQL Automation FixUp Scripts
– Fixing issues before and after upgrade

 Detai...
Information
 Please note:
– All of the following actions will apply to database

upgrades without changing to new hardwar...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Install and patch
Oracle 12c

Preupgrade
Checks

Prepare
Environment

Restore Entire
Database

Upgrade
Database

Post Upgr...
Case 1: Alternative without HW migration
 If the database would have been upgraded on the existing

hardware the Database...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Alternative without HW migration
 DBUA:

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Up...
Case 1: Summary
 Database upgrade including migration to a new server

1TB

1TB
24 hrs

Oracle 10.2.0.5

Oracle 12.1.0.1
...
Hands-On-Lab – Part 1

Upgrade a database to
Oracle Database 12c

Copyright © 2013, Oracle and/or its affiliates. All righ...
Hands-On-Lab – Part 1

Your first task will be:
Upgrade a database to Oracle Database 12c
– You will upgrade an Oracle 10...
Hands-On-Lab – Part 1
 Your environment:
– Oracle Virtual Box image
– OS user:
 oracle – password: oracle

 root – pass...
Hands-On-Lab – Part 1
 Switching between environments for V102:
Oracle 10.2.0 environment

Database SID: V102

$ORACLE_HO...
Hands-On-Lab – Part 1
 Make sure CPU virtualization is turned on in the BIOS:
– E.g. Lenovo – Change both settings to ENA...
Hands-On-Lab – Part 1
 Make sure CPU virtualization is turned on in the BIOS:
– E.g. DELL – Change setting(s) to ENABLED:...
Hands-On-Lab – Part 1
 Getting started:
– Copy the image from the USB drive to e.g. C:VMHOL
– Double-click on:

– The sta...
Introduction & Overview

General Preparation Steps
Upgrade & Migration Cases

RAC Upgrade + ASM

Fallback Strategies
New F...
Case 2: Upgrade RAC and move to ASM
 RAC Database migration to a new cluster including upgrade
Example Facts & Descriptio...
Case 2: Upgrade RAC and move to ASM
 RAC Database migration to a new cluster including upgrade

Install and patch:
GI and...
Physical Standby Migration
 Using a physical standby database to move to new

hardware with minimal downtime
– Fast and s...
RMAN Mixed Platform Support
 RMAN duplicate/restore/recovery Mixed Platform Support
– Note:1079563.1
– Mixed platforms ar...
Migration to ASM
 Option with downtime:
– Restore database with RMAN into Oracle ASM

 Option with less than 1 minute do...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Grid Infrastructure Installation
 Oracle Home/Base
– ORACLE_BASE for GI should be different than the ORACLE_BASE
for Orac...
GI Upgrade Planning, Prep and Prereqs
 RAC Best Practice and Starter Kit
– The goal of the Oracle Real Application Cluste...
RAC Check
 RACcheck 2.2.2 has been released June 18, 2013
– RACcheck is a RAC configuration audit tool for RAC, CRS, ASM,...
GI Home: Planning, Prep and Prereqs
 11.2 Grid Infrastructure Home cannot reside on a shared cluster file

system e.g. oc...
SCAN: Planning, Prep and Prereqs
 Oracle Database 11.2 Clients connect to the database using SCAN

VIPs
 The SCAN is ass...
SCAN: Planning, Prep and Prereqs
 SCAN VIPs - Network Requirement
– A single client access name (SCAN) configured in DNS
...
Completing the Upgrade
 Top Level Flow:
– Verify the hardware/software environment
– Install the software
– Configure the...
Completing the Upgrade
 Top Level Flow:
– Verify the hardware/software environment
 Secure Shell
– We recommend using OU...
Completing the Upgrade
 Top Level Flow:
– Verify the hardware/software environment
– Install the software

 Oracle Unive...
Grid Infrastructure 11.2
 Additional information: Pinning nodes [from documentation]
In order to change the node pin beha...
Grid Infrastructure Installation 11.2

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migr...
Grid Infrastructure Installation 11.2
Node Selection and SSH

Copyright © 2013, Oracle and/or its affiliates. All rights r...
Grid Infrastructure Installation 11.2
Grid Home

Make sure that BASE and SW location
are different subdirectories – the sl...
Grid Infrastructure Installation 11.2
Setup ASM Roles

Copyright © 2013, Oracle and/or its affiliates. All rights reserved...
Grid Infrastructure Installation 11.2
Cluster Verification

Copyright © 2013, Oracle and/or its affiliates. All rights res...
Grid Infrastructure Installation 11.2
Cluster Verification

Copyright © 2013, Oracle and/or its affiliates. All rights res...
Grid Infrastructure Installation 11.2
Cluster Verification

root> /tmp/CVU_11.2.0.1.0_grid/runfixup.sh
Response file being...
Grid Infrastructure Installation 11.2
Cluster Verification

Copyright © 2013, Oracle and/or its affiliates. All rights res...
Grid Infrastructure Installation 12c
Management Repository

Copyright © 2013, Oracle and/or its affiliates. All rights res...
Grid Infrastructure Installation 12c
Management Repository

Copyright © 2013, Oracle and/or its affiliates. All rights res...
Clusterware - ASM - DB Compatibility
Note:
337737.1

a) The Matrix is valid after the (rolling) upgrade has been completed...
Oracle Clusterware & ASM Upgrade


Documentation:
– Oracle Clusterware Administration and Deployment Guide 11g
http://dow...
Oracle Grid Infrastructure Patch Sets
 Oracle Grid Infrastructure Patch Set 11.2.0.3:
Patch set is a bit misleading: it’s...
Oracle EXADATA 11.2.0.3 Patching
 11.2.0.1/11.2.0.2 to 11.2.0.3 Database Upgrade on

Exadata Database Machine in Note:137...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Configuring ASM with ASMCA

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migrate and Con...
Configuring ASM with ASMCA

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migrate and Con...
Configuring ASM with ASMCA

DB0

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migrate an...
Configuring ASM with ASMCA

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Upgrade, Migrate and Con...
Case 2: Upgrade RAC and move to ASM
 RAC Database migration to a new cluster including upgrade

Install and patch:
GI and...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Source

Restore Online
...
Restore Backup into ASM
 Make sure the backup is available on DESTINATION
– rman target /

connected to target database (...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Synch and Activate Standby
 Stop the application on SOURCE
 Get the last changes written into logfiles on all nodes
– SQ...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Preupgrade Checks

Prepare Environment
and ASM

Restore Online
Backup f...
Install and patch:
GI and DB 11.2.0.3
DB 10.2.0.5

Prepare Environment
and ASM

Preupgrade Checks

Restore Online
Backup f...
Important Notes and White Papers
 TWP: Migration to Oracle ASM

http://www.oracle.com/technetwork/database/features/avail...
Case 2: Summary
 RAC Database migration to a new cluster including upgrade

5TB

5TB
4 hrs

Oracle 10.2.0.5

Oracle 10.2....
Real World Checkpoint
Customer
Project

 The Customer:

Interhyp AG
– HQ in Munich, Germany
– Bank for residential and

C...
Real World Checkpoint
Customer

 Project scope:
– Upgrade 6x 2-node-RAC systems all on

Project
Constraints

Preparation
...
Real World Checkpoint
Customer

 Constraints:
– Downtime window limited to 4 hrs per database
 Migrations to be done ser...
Real World Checkpoint
Customer

 Prepare new cluster
– Install Oracle Grid Infrastructure 11.2 and patch it

Project

– D...
Real World Checkpoint
Customer
Project
Constraints

Preparation

 Build up a physical standby database on the

new cluste...
Real World Checkpoint
Customer

 Upgrade
– Activate standby and start in STARTUP UPGRADE

Project
Constraints

 Invalida...
Real World Checkpoint
Customer

 Live? And alive?
– Yes!!! Go Live: 27-NOV-2010

Project

– Total downtime: ~2 hours
– Da...
Real World Checkpoint
Customer

 Well ... the optimizer ...
– We found some optimizer issues

Project

 Reports were aff...
Introduction & Overview

General Preparation Steps
Upgrade & Migration Cases

Endianness Migration

Fallback Strategies
Ne...
Case 3: Cross Endianness Migration
 Migration of a single instance database to Exadata
Example Facts & Description
1. Har...
Case 3: Cross Endianness Migration
 Options with Oracle 9i:
– exp and imp
 Import of all versions  Oracle V5 possible
–...
Case 3: Cross Endianness Migration
 Options since Oracle 10g:
– Data Pump expdp and impdp
 Usally the first option as it...
Case 3: Cross Endianness Migration
 Migration of a single instance database to Exadata

Prepare a
new database
on EXADATA...
Data Pump Overview
 The “new” faster export-import
– Available starting with Oracle 10.1
– Powerful concept:
 Restartabl...
Data Pump Overview
 Limitations
– Not compatible with "old" exp/imp
 "Old" par files can be used since Oracle 11.2 with ...
Data Pump Best Practices
 For full exports the role EXP_FULL_DATABASE is required
 For export consistency use:
– FLASHBA...
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upgrade and migrate_to_12c
Upcoming SlideShare
Loading in...5
×

Upgrade and migrate_to_12c

6,800

Published on

Oracle 12c Database Migration

Published in: Technology, Business
8 Comments
6 Likes
Statistics
Notes
  • Thank you i can download the document ....
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I have set it to allow download!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Please let us download this , reading on net not always possible as it has 519 slides
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Great Document .... it would have been excellent if u have allowed us to save the same :) ... Thank you for sharing
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Done!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
6,800
On Slideshare
0
From Embeds
0
Number of Embeds
42
Actions
Shares
0
Downloads
383
Comments
8
Likes
6
Embeds 0
No embeds

No notes for slide

Upgrade and migrate_to_12c

  1. 1. Upgrade, Migrate & Consolidate to Oracle Database 12c Roy Swonger & Mike Dietrich Database Upgrade and Utilities Oracle Corporation Updated: 17-JUL-2013
  2. 2. Introduction & Overview General Preparation Steps Upgrade & Migration Cases Fallback Strategies New Features in Oracle 12c Performance Management Wrap Up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 2
  3. 3. Database Upgrade Development Group Roy Swonger Senior Director Software Dev. & Product Management Carol Tagliaferri Senior Manager Software Dev. Cindy Lim Principal Member Technical Staff Joseph Errede Principal Member Technical Staff Mike Dietrich Senior Principal Technologist Eric Wittenberg Principal Software Engineer Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 3
  4. 4. Some MAGIC Questions Question? Answer Change to new hardware? Change to new operating system architecture? Change the characterset? Consolidation (schema/database/...) planned? Number of database to upgrade/migrate? Size of database(s) getting upgraded/migrated? Exact source and target Oracle version(s)? Max allowed downtime? Fallback requirements? Test environment and testing tools? Does a performance baseline exist? Change required to enable New Features? Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 4
  5. 5. Terminology  Database Upgrade – A database upgrade is called "Upgrade" because the data dictionary will get upgraded to a later version – This will include Oracle components, options such as JAVAVM, SDO – No data will be touched, changed or moved  Migration – A database migration will happen when the database will move to new: Hardware, operating system platform, character set  Software Upgrade – In-Place:  The new software will be installed into an existing SW location – Out-Of-Place  The new software will be installed into a new software location Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 5
  6. 6. Lifetime Support Policy today 2025 2024 2023 2022 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 (GA: Jul 2005) 2011 Oracle 10.2 2010 (GA: Jan 2004) 2009 JUL 2010 JAN 2007 Oracle 10.1 2008 2007 2006 2005 2004 (GA: Jul 2002) 2003 2002 Oracle 9.2 JAN 2012 JAN 2009 JUL 2010 Oracle 11.1 JUL 2013 AUG 2012 (GA: Aug 2007) Oracle 11.2 JUL 2015 AUG 2015 JAN 2018 JAN 2015 (GA: Sep 2009) Oracle 12.1 JUN 2018 (GA: Jun 2013) JUN 2021 today Premier Support Waived Extended Support Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Extended Support Upgrade, Migrate and Consolidate to Oracle Database 12c Limited ES Sustaining Support 6
  7. 7. Lifetime Support Policy  http://www.oracle.com/us/support/lifetime-support/index.html and Note: 209768.1 for Support Policy Explanation and details Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 7
  8. 8. Database Patch Set Roadmap  Release Schedule of Current Database Releases Note.742060.1 – Note.742060.1 contains also information about platform desupport and patching end dates Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 8
  9. 9. Upgrade Companion  Note:1462240.1 Upgrade Companion 12c (coming soon) − Note:785351.1 Upgrade Companion 11.2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 9
  10. 10. Upgrade OTN Page  http://otn.oracle.com/goto/upgrade  http://www.oracle.com/technetwork/database/upgrade/index.html Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 10
  11. 11. Maximum Availability Architecture OTN  http://otn.oracle.com/goto/maa  http://www.oracle.com/technetwork/database/features/availability/maa-090890.html Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 11
  12. 12. Upgrade Blog: blogs.oracle.com/UPGRADE Scroll down to go to the slides Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 12
  13. 13. INTERNAL PPT DOWNLOAD ONLY http://database.us.oracle.com ‘click’ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 13
  14. 14. Is It Time To Upgrade? Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 14
  15. 15. Upgrade and Migration Paths UPGRADE/MIGRATION exp/imp, expdp/impdp CTAS, COPY, SQL Loader N Stay on same OS? Y N SQL Apply & Transient Standby Transportable Tablespaces Y DBUA Full Transportable Export/Import CLI $> catctl.pl Oracle Golden Gate Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Downtime >30min? Upgrade, Migrate and Consolidate to Oracle Database 12c 15
  16. 16. Strategies?  Step-by-Step vs Big Bang – Upgrade/migration in pieces over a period of time  Considered as risk mitigating – Everything in one downtime window  Sometimes necessary due to dependencies  Least critical systems first vs most critical system first – Learn more with every step vs: – Learn about almost all from the beginning Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 16
  17. 17. Introduction & Overview General Preparation Steps Upgrade & Migration Cases Fallback Strategies New Features in Oracle 12c Performance Management Wrap Up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 17
  18. 18. Make sure everything is in good shape ...  So that you don’t go off the rails! Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 18
  19. 19. Preparation Checklist  In the SOURCE environment: Clean Up     Empty the recycle bin Check for INVALID objects in SYS/SYSTEM Check for duplicate objects in SYS/SYSTEM Remove outdated parameters Components  Check for INVALID components  Check for necessary components  Remove obsolete components Performance  Preserve performance statistics  Check network performance Optional Copyright © 2013, Oracle and/or its affiliates. All rights reserved.  Perform Integrity checks Upgrade, Migrate and Consolidate to Oracle Database 12c 19
  20. 20. Clean Up: Recycle Bin  Especially before patch or release upgrade purge the recycle bin: – SQL> purge DBA_RECYCLEBIN;  General recommendation: – Empty the recycle bin at least once per week with an automatic job during off-peak times Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 20
  21. 21. Clean Up: Invalid Objects  Always check for INVALID objects  SQL> select unique OBJECT_NAME, OBJECT_TYPE, OWNER from DBA_OBJECTS where STATUS='INVALID' order by OWNER;  There should be no invalid objects owned by SYS or SYSTEM – Recompile invalid objects with ?/rdbms/admin/utlrp.sql before upgrade/migration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 21
  22. 22. Clean Up: Duplicate Objects  Always check for DUPLICATE objects in SYS/SYSTEM  SQL> select OBJECT_NAME, OBJECT_TYPE from DBA_OBJECTS where OBJECT_NAME||OBJECT_TYPE in (select OBJECT_NAME||OBJECT_TYPE from DBA_OBJECTS where OWNER='SYS') and OWNER='SYSTEM' and OBJECT_NAME not in ('AQ$_SCHEDULES_PRIMARY', 'AQ$_SCHEDULES', 'DBMS_REPCAT_AUTH'); – Clean up using MOS Note:1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 22
  23. 23. Clean Up: Parameters  Remove outdated parameters, underscores and events from your init.ora/spfile – Example: _always_semi_join=off _unnest_subquery=false optimizer_features_enable=10.2.0.4 event="10061 trace name context forever, level 10" – Important: Also follow the application's upgrade instructions, such as EBS interoperability notes – these supersede any general removal recommendation Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 23
  24. 24. Clean Up: Parameters Real World Crosscheck  Internal Oracle production database – Multimedia (ORDIM) component took very long to upgrade _complex_view_merging = FALSE _multi_join_key_table_lookup = FALSE _library_cache_advice = FALSE _index_join_enabled = FALSE Upgrade time Remove all for ORDIM: _push_join_union_view = FALSE underscores _push_join_predicate = FALSE minutes and events 49 _always_semi_join = OFF _pred_move_around = FALSE _unnest_subquery = FALSE _predicate_elimination_enabled = FALSE _eliminate_common_subexpr = FALSE _no_or_expansion = FALSE event = '10195 trace name context forever, level 1' event = '10778 trace name context forever, level 1‘ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c Upgrade time for ORDIM: 7 minutes Factor x7 24
  25. 25. Components: Validation Check  Make sure all components are VALID before upgrade – SQL> select substr(COMP_ID, 1,10) compid, substr(COMP_NAME,1,24) compname, STATUS, VERSION from DBA_REGISTRY where STATUS<>'VALID'; – In case components are INVALID recompile with utlrp.sql – If that does not correct component status, further diagnosis might be required:  Note:472937.1 Information On Installed Database Components  Note:753041.1 How to diagnose Components with NON VALID status Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 25
  26. 26. Components: Necessary Components  General recommendation: – Standardize the set of installed database components throughout your environment  XDB component is mandatory in Oracle Database 12c  Consolidation: – All components must be installed in a CDB Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 26
  27. 27. Components: Removal  3 potential reasons to remove components: – A component does not exist anymore in Oracle Database 12c  EM Database Control Repository  Oracle UltraSearch  Rules Manager and Expression Filter  OLAP AMD – Speed up the upgrade process  Fewer components mean faster database upgrades – A component is obsolete  Typical example: In 11g, EM DB Control Repository exists you migrate to EM Cloud Control with its own dedicated repository – Further information  “Database Components Cleanup” presentation on our Blog – http://apex.oracle.com/pls/apex/f?p=202202:2:::::P2_SUCHWORT:components Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 27
  28. 28. Performance: Preserve Statistics  Gather accurate performance statistics from production – Accurate means: Starting at least 1 month before the upgrade – This is of vital importance!!! – Use Automatic Workload Repository (AWR)  Snapshots interval 30-60 minutes and retention >31 days  Extract AWR: SQL> @?/rdbms/admin/awrextr.sql  Performance snapshot comparison using AWR DIFF reports: SQL> select * from table( DBMS_WORKLOAD_REPOSITORY.AWR_DIFF_REPORT_HTML( <DBID>, 1, 101, 121, <DBID>, 1, 201, 221)); – Please note: AWR usage requires a Diagnostic Pack license – Alternative: STATSPACK MOS Note:466350.1 – Time important queries, reports, and batch jobs  See also: MOS Note:1477599.1 Best Practices Around Data Collection For Performance Issues Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 28
  29. 29. Performance: Network Bandwidth  Theoretical vs Real World network transfer rates: Interface Data Volumne Theoretical Transfer Speed Real World Transfer Speed 100 Mbit Ethernet 11MB/sec 40 GB/hour <30 GB/hour 1 Gbit Ethernet 110MB/sec 400 GB/hour <300 GB/hour 10 Gbit Ethernet 1.1GB/sec 4 TB/hour <3 TB/hour Infiniband IB 4xQDR 4GB/sec 14 .4TB/hour <11 TB/hour  Typical issues: – Transfer protocols: ftp, scp, NFS all work single threaded by default – Different network segments: Repeaters/switches cause slow down – Security settings: Firewalls can kill all performance efforts – External network provider, long distances, etc… Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 29
  30. 30. Performance: Network Strategies    Move archived data in advance If data files include lots of free space, export/import to avoid copying large numbers of empty blocks Transfer protocols: –  Slow hardware: –   Start parallel copy operations Install parallel network cards, replace outdated switches/repeaters Use features such as Data Guard or GoldenGate “Sneakernet”: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 30
  31. 31. Optional: Integrity Checks  Health Check (hcheck.sql) – Download hcheck.sql from MOS Note:136697.1 – This script will check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g. – Requires hOut Helper Package (hout.sql) from MOS Note:101468.1  RMAN Validation Check: – RMAN> backup check logical validate database;  See MOS Note:836658.1 for further details  Can be run in multiple parallel channels for speed up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 31
  32. 32. Preparation Check List  In the TARGET environment: Checks  Software Certification Information  Installation Requirements Download  Software and Patch Sets  CPUs, PSUs and Bundle Patches  Single Patches Settings Copyright © 2013, Oracle and/or its affiliates. All rights reserved.  Parameter Recommendations Upgrade, Migrate and Consolidate to Oracle Database 12c 32
  33. 33. Certification Check  Verify platform certification in My Oracle Support – Please see Note: 964664.1 and Note:431578.1 for explanations of Middleware and Application Server product group assignments Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 33
  34. 34. Software Download  How to access the software? – Get the latest patch set (if there's one available)!  http://support.oracle.com is the only source for patches and patch sets  Patch sets cannot be downloaded from eDelivery or OTN – Base release can be downloaded from:  http://edelivery.oracle.com/ – Software Delivery Cloud (formerly know as eDelivery) is the recommended source for downloading – If software is reissued, customers will be automatically informed via email – Or, download from OTN: http://otn.oracle.com/indexes/downloads/index.html Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 34
  35. 35. Installation of the new Software Patch Set / Base Release  Install newest PATCH SET (full install release since Oracle Database 11.2) or  Install base release into a new Oracle home (if there's no patch set available yet) PSU/BP Patches Upgrade  Apply newest available Patch Set Update (PSU) or  Apply recommended (bundled) patches (BP)  Apply Interim Patches for known issues  Now: Start the database upgrade/migration!!! Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 35
  36. 36. Example: Patch Set 11.2.0.3  Download patch set 11.2.0.3 from support.oracle.com: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 36
  37. 37. Patch Set Installation 11.2.0.3  Default: out-of-place patch upgrade!!! It’s a full release!!! – If you specify an in-place patch upgrade: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 37
  38. 38. Patch Set Installation 11.2.0.3  Patch set 11.2.0.3 is a full release – Therefore no need anymore to install 11.2.0.1 first!!!  Only way to do an in-place patch set installation – Backup your /dbs and /network/admin files – ./runInstaller –detachHome ORACLE_HOME=<11.2.0.1-home> $ ./runInstaller -detachHome ORACLE_HOME=/u01/orahomes/11.2.0 Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 10047 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/orabase 'DetachHome' was successful. – Remove your 11.2.0.1 home contents – Install 11.2.0.3 into the previous 11.2.0.1 home – Restore /dbs and /network/admin files – Upgrade your database with DBUA or catupgrd.sql Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 38
  39. 39. Unattended Installation/Configuration  Oracle 11.2 – see Note:885643.1 – SAVE RESPONSEFILE option in OUI available – Or: Start OUI “silent” with all required parameters  Will work on Windows platform as well  Home Cloning (script or Lifecycle Management Pack) – Prepare a fully patched Oracle Home – Create an archive consisting of all files  Exclude *log, *dbf, tnsnames/listener/sqlnet.ora – Unpack archive and then $ORACLE_HOME/clone/bin/clone.pl...  See your installation guide for more information on cloning an Oracle Home  For further information (also OS related) see the Oracle Database Server Installation Master Note:1156586.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 39
  40. 40. Unattended Installation/Configuration  Oracle Database 12c:   Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 40
  41. 41. Patching Notes Flow in MOS Check for: MOS Note:161818.1 » Click on the releases number « MOS Note:880782.1 Known Issues and Alerts in 11.2.0.x ? Oracle 11.2.0 MOS Note:1565065.1 Known Issues and Alerts in 12.1.0.x ? Oracle 12.1.0 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. » Click on "Availability and Known Issues" for your patch releases « » Click on "Availability and Known Issues" for your patch releases « Upgrade, Migrate and Consolidate to Oracle Database 12c MOS Note:1348336.1 Availability and Known Issues in 11.2.0.3 Recommended Patches Alerts Notable Fixes Issues Introduced MOS Note:756671.1 Recommended Database Patches MOS Note:1565082.1 Availability and Known Issues in 12.1.0.1 Check for: Recommended Patches Alerts Notable Fixes Issues Introduced MOS Note:756671.1 Recommended Database Patches 41
  42. 42. Important Alerts and One-Off-Patches?  Check for important alerts: Note:161818.1 ‘click’ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 42
  43. 43. Upgrade Information / Alerts  Known issues in 11.2.0.x? See Note:880782.1 ‘click’ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 43
  44. 44. Upgrade Information / Alerts  Recommended Patches for 11.2.0.3? Note:1348336.1 − See also Recommended Database Patches Note:756671.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 44
  45. 45. Recommended Patches: PSUs  Install the latest PSU as well – Note:854428.1: Introduction to Database Patch Set Updates – Note:1227443.1: Patch Set Updates Known Issues – Database PSUs include:  Fixes for critical issues that may affect a large number of customers and that are already proven in the field  Critical Patch Update fixes – Database PSUs do not include:  Changes that require re-certification  Fixes that require configuration changes – Typically 25-100 new bug fixes per PSU – Guaranteed to be RAC rolling installable – Released 4x per year - same schedule for PSUs and CPUs  16-APR-2013, 16-JUL-2013, 15-OCT-2013 & 14-JAN-2014 – PSU check: opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU' Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 45
  46. 46. Upgrade Information / Alerts  Alerts and new issues with 11.2.0.3? Note:1348336.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 46
  47. 47. Upgrade Information / Alerts  Alerts and new issues with 11.2.0.3? Note:1348336.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 47
  48. 48. Important Optimizer Issues and Fixes  Things to consider before upgrade to Oracle Database 11.2.0.3 to avoid Poor Performance or Wrong Results: MOS Note:1392633.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 48
  49. 49. Recommended OS patches  MOS Note:169706.1: OS Installation and Configuration Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 49
  50. 50. Standby-First-Patching  Oracle Data Guard Standby-First Patch Apply – MOS Note:1265700.1 - Data Guard Standby-First Patch Apply – Apply a patch first on the physical standby site – Different software releases allowed between primary and standby  Role transitions allowed for rolling upgrades – Supported for:  Patch Set Update (PSU), Critical Patch Update (CPU) and PSE  Oracle Grid Infrastructure Patches or Software Updates  One-off patches  Oracle Exadata Database Machine bundled patches (BP), Quarter Database Patches, Storage Server Software patches (Cell), hardware/network changes  Operating System software changes that do not have any dependencies on Oracle database software – Available beginning with Oracle Database 11.2.0.1  RDBMS COMPATIBLE must remain the same  ASM COMPATIBLE can be different Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 50
  51. 51. Parameter Recommendations  General guidelines: – The fewer parameters you have in your spfile, the better – Remove outdated parameters, underscores, events ...  Unless directed by applications (e.g. E-Business Suite, Siebel, SAP etc.) to set them – Try to adjust certain parameters based on testing, documentation and white papers  Don't trust statements such as ..."THE tuning guru said ..." Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 51
  52. 52. Parameter Recommendations - Info  June 6, 2012 https://www.pcworld.com/article/257045/6_5m_linkedin_passwords_posted_online_after_apparent_hack.html Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 52
  53. 53. Parameter Recommendations - Info  March 3, 2013: http://www.huffingtonpost.com/2013/03/03/evernote-hacked-50-million-passwords-reset_n_2801108.html Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 53
  54. 54. Parameter Recommendations  SEC_CASE_SENSITIVE_LOGON=TRUE – Enables or disables password case sensitivity – Default TRUE since Oracle Database 11g – Deprecated since Oracle Database 12c – Recommendation:  Age out passwords having PASSWORD_VERSIONS<11G  When recreated, passwords will get salted – This is a MUST – no discussion, please!!  Check if passwords have been adjusted: – SQL> select USERNAME, PASSWORD_VERSIONS from DBA_USERS; USERNAME PASSWORD_VERSIONS ---------- ----------------APP_USER 10G 11G 12C HR_USER 10G 11G 12C BOSS 10G Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 54
  55. 55. Parameter Recommendations sqlnet.ora  SQLNET.ALLOWED_LOGON_VERSION_SERVER – Determines minimum authentication protocol allowed by server – Default: 11 – Values:  12a for Oracle Database 12c authentication protocols (strongest protection)  12 for the critical patch updates CPUOct2012 and later Oracle Database 11g authentication protocols (recommended)  11 for Oracle Database 11g authentication protocols (default)  10 for Oracle Database 10g authentication protocols 8 for Oracle9i authentication protocol – If you connect with pre-11g clients to Oracle Database 12c you will have to adjust the setting in your sqlnet.ora file(s) Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 55
  56. 56. Parameter Recommendations  AUDIT_TRAIL – Enables or disables database auditing – Attention: New Unified Auditing can be linked into the kernel  Unified Auditing is not enabled by default – Recommendation:  Migrate to Unified Auditing  Check if option is present : – SQL> select VALUE from V$OPTION where PARAMETER='Unified Auditing';  Switch Unified Auditing on – make -f ins_rdbms.mk uniaud_on ioracle ORACLE_HOME=$ORACLE_HOME  Set AUDIT_TRAIL=NONE – Note: Auditing table AUD$ will be moved into SYS schema if Label Security (OLS) is installed Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 56
  57. 57. Parameter Recommendations  DEFERRED_SEGMENT_CREATION – Newly created tables will just allocate segments when a first row gets inserted  Tablespace must be locally manages  COMPATIBLE ≥ 11.2.0 – Default is TRUE since Oracle Database 11.2 – Recommendation:  Set it to FALSE except for cases where an application creates a large number of empty tables with may never get used  Please note: – Small performance penalty when the first row is inserted, because the new segment must be created at that time – May cause contention issues using many Data Pump workers  See MOS Note 1216282.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 57
  58. 58. Parameter Recommendations  _OPTIMIZER_COST_BASED_TRANSFORMATION – See MOS Note: 1082127.1 for more details on CBQT  CBQT can add a high overhead at parse time but can yield considerable benefits by way of a better plan for the statement – Recommendation:  Due to limited gain and some open issues you may set it OFF  See MOS Note: 567354.1 about open issues and fixes: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 58
  59. 59. Parameter Recommendations  SESSION_CACHED_CURSORS – Default: 50 – Cursor caching mechanism was changed in Oracle 10.2.0.4 – Recommendation:  Explicitly adjust SESSION_CACHED_CURSORS as the default value of 50 may be too low, especially when PL/SQL is used – Too high values may lead to fragmentation in shared pool  Use MOS SCRIPT: 208857.1 to adjust parameters SESSION_CACHED_CURSORS and OPEN_CURSORS usage based  More information in MOS Note: 30804.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 59
  60. 60. Parameter Recommendations  _DATAFILE_WRITE_ERRORS_CRASH_INSTANCE=TRUE – Default: TRUE – For write errors to ANY data file, the default behavior has changed since patch set 11.2.0.2  An I/O write error to ANY data file will crash the instance  Setting it to FALSE would revert to the "old" behavior: – Write error will OFFLINE the data file if:  Database is in archivelog mode  Data file does not belong to the SYSTEM tablespace  In that case it would initiate a SHUTDOWN ABORT  See Bug 7691270 and MOS Note: 7691270.8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 60
  61. 61. Parameter Recommendations  MAX_STRING_SIZE – Values: STANDARD, EXTENDED – Controls the maximum size of VARCHAR2, NVARCHAR2, and RAW data types in SQL – STANDARD [DEFAULT]  Length limits prior to Oracle Database 12c apply – VARCHAR2/NVARCHAR2: 4000 bytes – RAW: 2000 bytes – EXTENDED  New 32767 byte limit applies  Requires COMPATIBLE ≥ 12.0.0 – Change from STANDARD  EXTENDED is allowed, but no way back – Database in UPGRADE mode: @?/rdbms/admin/utl32k.sql Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 61
  62. 62. New Parameters in Oracle Database 12c                     CELL_OFFLOADGROUP_NAME CONNECTION_BROKERS DB_BIG_TABLE_CACHE_PERCENT_TARGET DB_INDEX_COMPRESSION_INHERITANCE DNFS_BATCH_SIZE ENABLE_PLUGGABLE_DATABASE HEAT_MAP MAX_STRING_SIZE NONCDB_COMPATIBLE OPTIMIZER_ADAPTIVE_FEATURES OPTIMIZER_ADAPTIVE_REPORTING_ONLY PARALLEL_DEGREE_LEVEL PARALLEL_FAULT_TOLERANCE_ENABLED PDB_FILE_NAME_CONVERT PGA_AGGREGATE_LIMIT SPATIAL_VECTOR_ACCELERATION TEMP_UNDO_ENABLED THREADED_EXECUTION UNIFIED_AUDIT_SGA_QUEUE_SIZE USE_DEDICATED_BROKER Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 62
  63. 63. Deprecated and Obsolete Parameters  Deprecated in Oracle Database 12c: – sec_case_sensitive_logon  Obsolete in Oracle Database 12c: – _app_ctx_vers – _log_io_size Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 63
  64. 64. Introduction & Overview General Preparation Steps Upgrade & Migration Cases Upgrade 32/64bit Fallback Strategies New Features in Oracle 12c Performance Management Wrap Up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 64
  65. 65. Case 1: Upgrade to Oracle Database 12c  Database upgrade including migration to a new server Example Facts & Description 1. Hardware migration 2. Database upgrade from Oracle 10.2.0.5 Linux 32bit to Oracle 12.1 Linux 64bit 3. Maximum tolerated downtime: 24 hours 4. Database size: 1TB 1TB 1TB 24 hrs Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 65
  66. 66. Case 1: Upgrade to Oracle Database 12c  Database upgrade including migration to a new server Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database 1TB Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 66
  67. 67. Upgrade to Oracle Database 12c Oracle 7.3.4 Oracle 7.3 (GA: 1996) Oracle 8.0 (GA: 1997 Oracle 8.1 (GA: 1998) Oracle 8.0.6 Oracle 8.1.7.4 Oracle 9.0.1.4 Oracle 9.2.0.8 Oracle 101.0.5 Oracle 10.2.0.5 Oracle 11.10.7 Oracle 11.2.0.2 9.2.0.8 8.0.6 11.2.0.2 9.2.0.8 7.3.4 11.2.0.2 8.1.7.4 Oracle 9.0 (GA: 2001) Oracle 9.2 (GA: Jul 2002) Oracle 10.1 (GA: Jan 2004) Oracle 10.2 (GA: Jul 2005) Oracle 12.1.0.1 10.2.0.5 9.0.1.4 10.2.0.5 11.2.0.2 9.2.0.8 11.2.0.2 10.1.0.5 10.2.0.5 Oracle 11.1 DIRECT 11.1.0.7 (GA: Aug 2007) Oracle 11.2 DIRECT 11.2.0.2 (GA: Sep 2009) DIRECT Oracle 12.1 (GA: Jun 2013) Please note: This graph will apply to database upgrades only! Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 67
  68. 68. What's new in upgrades to Oracle 12c?  New SQL Automation FixUp Scripts – Fixing issues before and after upgrade  Detailed recommendations  Parallel Upgrade – Saving up to 40% upgrade duration – Upgrade driven by catctl.pl, not catupgrd.sql anymore catctl.pl script1.sql script2.sql script3.sql script4.sql script7.sql script9.sql script5.sql script8.sql script10.sql script6.sql script11.sql script6.sql Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 68
  69. 69. Information  Please note: – All of the following actions will apply to database upgrades without changing to new hardware as well – just skip the steps to copy files from one system to another – Some of the following steps can be executed in parallel or in a different order, especially during preparation phase – for simplification these steps are kept in a strongly sequential order for the slides only Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 69
  70. 70. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Installation of Oracle Database 12c 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 70
  71. 71. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Patch the new Oracle Database 12c home Apply the newest available Patch Set Update (PSU) or Apply recommended (bundled) patches (BP) Apply Interim Patches for known issues 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 71
  72. 72. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  New preupgrade scripts – preupgrd.sql and utluppkg.sql supersede utlu112i.sql  Copy ?/rdbms/admin/preupgrd.sql and ?/rdbms/admin/utluppkg.sql from your new Oracle 12c home to your "old" source $ORACLE_HOME/rdbms/admin  Start preupgrd.sql in your source database – You may start preupgrd.sql in source environment's SQL*Plus directly from the Oracle 12c home avoiding the copy operation 1TB Copy preupgrd.sql and utluppkg.sql Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 72
  73. 73. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  preupgrd.sql generates 1 log file and 2 scripts SQL> @?/rdbms/admin/preupgrd.sql generates its output in directory: $ORACLE_BASE/cfgtoollogs/V102/preupgrade preupgrade.log has detailed information about any findings, suggestions, warnings, corrections and errors in your source database preupgrade_fixups.sql is the script you will need run in your source database – it will fix some issues or direct to fixes the DBA has to implement postupgrade_fixups.sql 1TB is meant to run shortly after the upgrade and will fix open issues – and it will contain directions for manual interaction as well (eg time zone change) Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 73
  74. 74. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Run the new preupgrade script preupgrd.sql 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 74
  75. 75. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  If JAVAVM is not present or invalid or option off preupgrd.sql won't create output files – Workaround: $ $ $ $ cd $ORACLE_BASE/cfgtoollogs mkdir <DB_UNIQUE_NAME> cd <DB_UNIQUE_NAME> mkdir preupgrade Tracked as Bug14614756 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 75
  76. 76. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Output log: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 76
  77. 77. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Run preupgrade_fixups.sql: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 77
  78. 78. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Manual actions required: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 78
  79. 79. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Further manual actions may be recommended: – Remove Enterprise Manager Database Control Repository:  $> emctl stop dbconsole SQL> @?/rdbms/admin/emremove.sql  EM DB Control is superseded in 12c by EM Express – Therefore no repository is needed anymore – If the EM repository is not removed up front, it will be automatically removed during the catuppst.sql post-upgrade phase 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 79
  80. 80. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Further manual actions may be recommended: – Essential step if OLS (Label Security) and/or DV (Database Vault) was already in the database prior to the upgrade  SQL> @?/rdbms/admin/olspreupgrade.sql  Prepares the move of AUD$ table from SYSTEM to SYS  Processes the audit records to minimize downtime – Moves records to an interim temporary table  May require DV actions as well (see the documentation) 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 80
  81. 81. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Edit new init.ora: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 81
  82. 82. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Create a new password file: $> cd $ORACLE_HOME/dbs $> orapwd file=orapwV102 password=<string> entries=15 format=12 force=yes 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 82
  83. 83. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Enviroment: Set the 12.1 environment Set ORACLE_BASE, ORACLE_HOME, ORACLE_SID, TNS_ADMIN, TMP and TMPDIR Windows only: Create a new Service: oradim –NEW -SID ORASID -SYSPWD passwrd -STARTMODE a -PFILE initfile 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 83
  84. 84. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Listener configuration: Be aware if clients <11g connect – then you must set: SQLNET.ALLOWED_LOGON_VERSION_SERVER=10 1TB in $ORACLE_HOME/network/admin/sqlnet.ora Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 84
  85. 85. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Either restore and recover an RMAN Online Backup RMAN> run { SET ARCHIVELOG DESTINATION TO '/tmp/tmprest'; RESTORE DATABASE; RECOVER DATABASE; } – Create a fresh TEMP tablespace  Or copy all relevant files to the new server – Data files, redo logs, control files.  Network throughput is important! 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 85
  86. 86. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Changing to the same OS platform, but from 32bit  64bit – Change will be handled automatically as part of the upgrade – Special case: Keep the database version (not an upgrade!)  In the source environment: startup upgrade; @?/rdbms/admin/utlirp.sql shutdown immediate In the destination environment: startup upgrade @?/rdbms/admin/utlrp.sql  OLAP must be reloaded with xumuts.plb – see MOS Note:352306.1 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 86
  87. 87. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Start the database in STARTUP UPGRADE mode: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 87
  88. 88. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  What happens during STARTUP UPGRADE mode? – Suppresses more than 20 expected error messages such as ORA-942 Snippet taken from the alert.log during STARTUP UPGRADE: ALTER SYSTEM enable restricted session; ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY; Autotune of undo retention is turned off. ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY; ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY; ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY; ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=MEMORY; Resource Manager disabled during database migration: plan '' not set ALTER SYSTEM SET resource_manager_plan= SCOPE=MEMORY; ALTER SYSTEM SET recyclebin='OFF' DEFERRED SCOPE=MEMORY; Resource Manager disabled during database migration replication_dependency_tracking turned off (no async multimaster replication found) 1TB AQ Processes can not start in restrict mode Completed: ALTER DATABASE OPEN MIGRATE Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 88
  89. 89. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  New parallel upgrade script – Default feature in Oracle Database – SERVER component upgrade scripts get executed in parallel, where possible – Other non-dependent components are run in parallel – Overall time to upgrade is reduced between 20% and 40% catctl.pl – Parallel upgrade is driven by a PERL script script1.sql script2.sql script3.sql script4.sql script7.sql script9.sql script5.sql script8.sql script10.sql script6.sql script11.sql script6.sql Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 89
  90. 90. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Parallel Upgrade – Customer Examples  Telco System, Japan Test upgrade from Oracle 9.2.0.8 to Oracle 11.2.0.3 Serial/Default Parallel 1046 ORACLE SERVER Component Upgrade 669 0 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 500 36% faster 1000 1500 seconds Upgrade, Migrate and Consolidate to Oracle Database 12c 90
  91. 91. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Parallel Upgrade – Customer Examples  Payback GmbH, Germany Upgrade from Oracle 11.1.0.7 to Oracle 11.2.0.3 on Exadata X2-2 Serial/Default 539 ORACLE SERVER Component Upgrade 37% faster 338 0 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 200 Parallel 400 Upgrade, Migrate and Consolidate to Oracle Database 12c seconds 600 seconds 91
  92. 92. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Upgrade duration to Oracle 12c mainly depends on: – Number of installed components and database options – Number of objects in the database due to high amount of new dictionary tables, and restructuring of some base system tables – CPU Speed Component HH:MM:SS Oracle Server 00:16:17 JServer JAVA Virtual Machine 00:05:19 Component HH:MM:SS Oracle Workspace Manager 00:01:01 Oracle Server 00:16:17 Oracle Enterprise Manager 00:10:13 JServer JAVA Virtual Machine 00:05:19 Oracle XDK 00:00:48 Oracle XDK 00:00:48 Oracle Text 00:00:58 Oracle Text 00:00:58 Oracle XML Database 00:04:09 Oracle XML Database 00:04:09 Oracle Database Java Packages 00:00:33 Oracle Database Java Packages 00:00:33 Oracle Multimedia 00:07:43 Gathering Statistics 00:02:43 Oracle Expression Filter 00:00:18 Oracle Rule Manager 00:00:12 Gathering Statistics 00:04:53 Total Upgrade Time: 00:30:47 Total Upgrade Time: 00:52:31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 92
  93. 93. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Speed up the upgrade – Create fresh dictionary statistics the night before the upgrade  SQL> exec DBMS_STATS.GATHER_DICTIONARY_STATS; – Create statistics for a specific XDB table if XDB is in use  SQL> exec DBMS_STATS.GATHER_TABLE_STATS(ownname=>'XDB', tabname=>'XDB$RESOURCE', estimate_percent=>NULL); – Preprocess missing entries in AUD$ if auditing was/is on  MOS Note: 1329590.1 offers a script to populate missing entries  If auditing was/is on by accident: – SQL> truncate table SYS.AUD$ | SYSTEM.AUD$; – If Oracle APEX is used consider to upgrade it separately  See MOS Note:1088970.1: Master Note for Oracle APEX Upgrades Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 93
  94. 94. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Start the upgrade on the Shell with catctl.pl in parallel: • catctl.pl is the PERL driver • Will execute the upgrade scripts in parallel where possible • Executes catuppst.sql and catbundle.sql as well • -n y determines the parallel degree • Maximum of 8 parallel threads 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 94
  95. 95. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Progress monitoring while catctl.pl is running: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 95
  96. 96. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Default location for catctl.pl log files: • Current working directory • Hint: use –l parameter to specify location • One log file for each parallel thread 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 96
  97. 97. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Restart the database in normal mode – Create an spfile from the startup init.ora now 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 97
  98. 98. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Recompilation with utlrp.sql – SQL> @utlprp n can be called directly to customize CPU usage  Most efficient value for n is 2x number of CPU cores – Gathering fixed objects stats may speed up recompilation  SQL> exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 98
  99. 99. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Monitoring while utlrp.sql is running: 1. Objects requiring compilation: SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); 2. Objects compiled already: SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; 3. Parallel jobs created by UTL_RECOMP: SELECT job_name FROM dba_scheduler_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%'; 4. Parallel jobs still running: SELECT job_name FROM dba_scheduler_running_jobs WHERE job_name like 'UTL_RECOMP_SLAVE_%'; 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 99
  100. 100. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  New status in DBA_REGISTRY for the SERVER component in case of any error before recompilation: COMP_ID COMP_NAME VERSION STATUS -------- ----------------------------------- ----------- ---------CATALOG Oracle Database Catalog Views 12.1.0.1.0 INVALID CATPROC JAVAVM CATJAVA ... Oracle Database Packages and Types JServer JAVA Virtual Machine Oracle Database Java Packages 12.1.0.1.0 12.1.0.1.0 12.1.0.1.0 INVALID VALID VALID – Check REGISTRY$ERROR for error details – After recompiliation the status remains the same compared to previous releases Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 100
  101. 101. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Execute postupgrade_fixups.sql: 1509653.1 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 101
  102. 102. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Run upgrade status check: utlu121s.sql: 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 102
  103. 103. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Run invalid objects check: utluiobj.sql – Check also DBA_INVALID_OBJECTS SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_INVALID_OBJECTS 1TB order by 1,2; Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 103
  104. 104. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Time zone adjustment – Time zone conversion should be done post upgrade – Required if datatype TIMESTAMP WITH TIME ZONE is used – Rule: TZDestination ≥ TZSource – Time zone definitions in: $ORACLE_HOME/oracore/zoneinfo Oracle Database Release Default Time Zone Vers. 10.2.0.3 – 10.2.0.5 DST V4 11.1.0.6 – 11.1.0.7 DST V4 11.2.0.1 DST V11 11.2.0.2 – 11.2.0.3 DST V14 12.1.0.1 DST V18 Most recent interim patch: See MOS Note:412160.1 DST V20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 104
  105. 105. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Time zone adjustment – Why is this important? – Real World Example from 2012:  Why is the flight 1 hour shorter on Saturday? – Neither a faster jet nor better winds are the reason ... it's DST!!! » The USA moves to daylight savings time at 2:00 on 11-MAR-2012 » Germany does not change until 25-MAR-2012 » In 2013 it works better  Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 105
  106. 106. Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions  Time zone adjustment: Use the scripts from MOS Note:1509653.1 (or MOS Note:977512.1: Updating the RDBMS DST version in 11.2) Database will be restarted! 1TB Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 106
  107. 107. Case 1: Alternative without HW migration  If the database would have been upgraded on the existing hardware the Database Upgrade Assistant (DBUA) would have been an alternative Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 107
  108. 108. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 108
  109. 109. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 109
  110. 110. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 110
  111. 111. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 111
  112. 112. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 112
  113. 113. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 113
  114. 114. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 114
  115. 115. Case 1: Alternative without HW migration  DBUA: Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 115
  116. 116. Case 1: Summary  Database upgrade including migration to a new server 1TB 1TB 24 hrs Oracle 10.2.0.5 Oracle 12.1.0.1 RHEL4 – 32bit OEL6– 64bit Install and patch Oracle 12c Preupgrade Checks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Prepare Environment Restore Entire Database Upgrade, Migrate and Consolidate to Oracle Database 12c Upgrade Database Post Upgrade Actions 116
  117. 117. Hands-On-Lab – Part 1 Upgrade a database to Oracle Database 12c Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 117
  118. 118. Hands-On-Lab – Part 1 Your first task will be: Upgrade a database to Oracle Database 12c – You will upgrade an Oracle 10.2.0.5 database – On command line – Do all the pre- and post-upgrade fixes  Please ask if you have questions … anytime!!!  Precaution: This is not a scripted demo lab – you'll have to type  Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 118
  119. 119. Hands-On-Lab – Part 1  Your environment: – Oracle Virtual Box image – OS user:  oracle – password: oracle  root – password: oracle – Database user:  sys – password: oracle  system – password: oracle – Listener: /u01/app/oracle/product/12.1.0/network/admin Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 119
  120. 120. Hands-On-Lab – Part 1  Switching between environments for V102: Oracle 10.2.0 environment Database SID: V102 $ORACLE_HOME for Oracle 10.2.0.5  /u01/app/oracle/product/10.2.0 $> . db10 Type in an xterm: <DOT><BLANK>db10 Oracle 12.1.0 environment Database SID: V102 $ORACLE_HOME for Oracle 12.1.0.1  /u01/app/oracle/product/12.1.0 $> . db10c Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Type in an xterm: <DOT><BLANK>db10c Upgrade, Migrate and Consolidate to Oracle Database 12c 120
  121. 121. Hands-On-Lab – Part 1  Make sure CPU virtualization is turned on in the BIOS: – E.g. Lenovo – Change both settings to ENABLED: – Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 121
  122. 122. Hands-On-Lab – Part 1  Make sure CPU virtualization is turned on in the BIOS: – E.g. DELL – Change setting(s) to ENABLED: – Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 122
  123. 123. Hands-On-Lab – Part 1  Getting started: – Copy the image from the USB drive to e.g. C:VMHOL – Double-click on: – The startup will take a few minutes – 4 GB RAM and two cores will be allocated. If your laptop has <8 GB RAM, you may need to reduce the RAM in the VM. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 123
  124. 124. Introduction & Overview General Preparation Steps Upgrade & Migration Cases RAC Upgrade + ASM Fallback Strategies New Features in Oracle 12c Performance Management Wrap Up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 124
  125. 125. Case 2: Upgrade RAC and move to ASM  RAC Database migration to a new cluster including upgrade Example Facts & Description 1. Hardware migration to a new cluster 2. Database upgrade from Oracle 10.2.0.5 Linux 32bit to Oracle 11.2.0.3 Linux 64bit 3. Migration from OCFS into Oracle ASM 4. Maximum tolerated downtime: 4 hours 5. Database size: 5TB 5TB 5TB 4 hrs Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 125
  126. 126. Case 2: Upgrade RAC and move to ASM  RAC Database migration to a new cluster including upgrade Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Restore Online Backup for Standby Prepare Environment and ASM 5TB Activate and Upgrade Post Upgrade Actions 5TB 4 hrs Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 126
  127. 127. Physical Standby Migration  Using a physical standby database to move to new hardware with minimal downtime – Fast and simple to setup and maintain – The entire process can be tested over and over again  With minimal impact on production – It would even work cross platform in some cases:  For supported combinations see: Note:413484.1 – HP-PA 11.23  HP-IA64 in Oracle ≥10.2.0.2 » See: Note:395982.1 – MS Windows  Linux from Oracle ≥ 11g – Solaris x86  Linux x86 from Oracle ≥ 11g  But currently no cross-Endianness combinations possible Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 127
  128. 128. RMAN Mixed Platform Support  RMAN duplicate/restore/recovery Mixed Platform Support – Note:1079563.1 – Mixed platforms are only supported for:    Active Database DUPLICATE Backup-based DUPLICATE using image copies or backup sets RESTORE and RECOVER using image copies or backup sets  The following platform combinations are supported (in both directions): – Oracle 10.2 and above:  Solaris x64  Linux x64  HP PA RISC  HP Itanium  Windows IA64  Windows 64-bit for AMD / Windows (x86-64) – Oracle 11.1 and above (COMPATIBLE ≥ 11.1):  Linux  Windows – If there's a bit change involved (3264) then utlirp.sql has to be run to invalidate all PL/SQL and stored code Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 128
  129. 129. Migration to ASM  Option with downtime: – Restore database with RMAN into Oracle ASM  Option with less than 1 minute downtime: – Restore database for Standby with RMAN into Oracle ASM – If no database upgrade is required:  Simple role exchange: Switchover – If a subsequent database upgrade is required:  Activate the standby database  Upgrade the activated database  In case of failure the source database remains unchanged Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 129
  130. 130. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Always install (or later: upgrade) Oracle Clusterware first! – Install it into a new Grid Infrastructure home – The grid infrastructure version must be greater than or equal to the version of the resources it manages e.g. ASM, RDBMS – Parts of Grid Infrastructure home are owned by 'root‘ – Make sure to check Note:948456.1 for known issues 5TB Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 130
  131. 131. Grid Infrastructure Installation  Oracle Home/Base – ORACLE_BASE for GI should be different than the ORACLE_BASE for Oracle Database – Each installation user should have its own Oracle Base Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 131
  132. 132. GI Upgrade Planning, Prep and Prereqs  RAC Best Practice and Starter Kit – The goal of the Oracle Real Application Clusters (RAC) Best Practice and Starter Kit is to provide you with the latest information on generic and platform specific best practices for implementing an Oracle RAC cluster – Always start with the Generic note, and then refer to platform specific notes – MOS Note: 810394.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Generic) – MOS Note: 811306.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Linux) – MOS Note: 811271.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Windows) – MOS Note: 811293.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (AIX) – MOS Note: 811303.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (HP-UX) – MOS Note: 811280.1 - RAC and Oracle Clusterware Best Practices and Starter Kit (Solaris)  Plus additional VERY useful notes: – MOS Note: 1096952.1 - Master Note for RAC, Clusterware and Grid Infrastructure – MOS Note: 1053147.1 - 11.2 Clusterware and Grid Home – What you need to know! Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 132
  133. 133. RAC Check  RACcheck 2.2.2 has been released June 18, 2013 – RACcheck is a RAC configuration audit tool for RAC, CRS, ASM,GI – Checks for:  OS kernel parameters, OS packages, OS settings etc  CRS/Grid Infrastructure, RDBMS, ASM, Database parameters  11.2.0.3 Upgrade Readiness assessment – RACcheck 11.2.0.3 Upgrade Readiness Assessment MOS Note:1457357.1 – RACcheck Users Guide https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=1268927.1:RACCHECKUSERSGUIDE&clickstream=no  Available for download via MOS Note:1268927.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 133
  134. 134. GI Home: Planning, Prep and Prereqs  11.2 Grid Infrastructure Home cannot reside on a shared cluster file system e.g. ocfs2, Veritas CFS – NFS based shared storage is supported – Installer will allow move from 10.2 on CFS to 11.2 on non-CFS  All cluster nodes must be up and running – Remove any down nodes, or start them if possible  Unset environment variables ORACLE_HOME, ORACLE_BASE and ORA_CRS_HOME for the installing user - the install scripts handle these  Avoid OUI AttachHome issues – Set the following parameter in the SSH daemon configuration file /etc/ssh/sshd_config on all cluster nodes before running OUI  LoginGraceTime 0 – Restart sshd  Provision network resources for Single Client Access Name (SCAN) Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 134
  135. 135. SCAN: Planning, Prep and Prereqs  Oracle Database 11.2 Clients connect to the database using SCAN VIPs  The SCAN is associated with the entire cluster rather than an individual node  Resolves to up to 3 IP Addresses in DNS or GNS – IP addresses returned in a round-robin manner  SCAN listeners run under the Grid Infrastructure Home  Provides load balancing and failover for client connections  Check this white paper for more details: – Oracle Real Application Clusters 11g Release 2 Overview of SCAN (PDF) http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 135
  136. 136. SCAN: Planning, Prep and Prereqs  SCAN VIPs - Network Requirement – A single client access name (SCAN) configured in DNS [root@cluster1 oracle]# nslookup mycluster-scan1 Server: 120.20.190.70 Address: 120.20.190.70#53 Name: mycluster -scan1.mydomain.com Address: 10.148.46. 79 Name: mycluster -scan1.mydomain.com Address: 10.148.46. 77 Name: mycluster -scan1.mydomain.com Address: 10.148.46. 78 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 136
  137. 137. Completing the Upgrade  Top Level Flow: – Verify the hardware/software environment – Install the software – Configure the software – Finalize the upgrade Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 137
  138. 138. Completing the Upgrade  Top Level Flow: – Verify the hardware/software environment  Secure Shell – We recommend using OUI to set up ssh » Old ssh setup not always considered valid by 11.2 OUI, due to tighter restrictions, but OUI will correct it – OUI will validate ssh before allowing you to continue » Watch out for stty commands or profile messages that may cause the automatic setup of ssh to fail  Cluster Verification Utility – Integrated into OUI but recommended to run before an install/upgrade – Has “fixup scripts” to correct certain failures (e.g. kernel parameters) – The most recent version is available from OTN » http://www.oracle.com/technetwork/products/clustering/overview/index.html – Install the software – Configure the software – Finalize the upgrade Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 138
  139. 139. Completing the Upgrade  Top Level Flow: – Verify the hardware/software environment – Install the software  Oracle Universal Installer – ./runInstaller – Should find existing Oracle Clusterware and suggest upgrade to Grid Infrastructure – Must run installer as the previous version's software owner – If you need to collect debug tracing (request from support) » ./runInstaller -debug » Output is written to stdout by default » Use script command to capture the output – Configure the software – Finalize the upgrade Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 139
  140. 140. Grid Infrastructure 11.2  Additional information: Pinning nodes [from documentation] In order to change the node pin behavior the appropriate command is the /crsctl pin/unpin css/ command, to pin or unpin any specific node. Pinning a node means that the association of a node name with a node number is fixed. If a node is not pinned, its node number may change if the lease expires while it is down. The lease of a pinned node never expires. Deleting a node with the /crsctl delete node/ command implicitly unpins the node. – During upgrade of Oracle Clusterware, all servers are pinned, whereas after a fresh installation of Oracle Clusterware 11/g /release 2 (11.2), all servers you add to the cluster are unpinned. – You cannot unpin a server that has an instance of Oracle RAC that is older than Oracle Clusterware 11/g/ release 2 (11.2) if you installed Oracle Clusterware 11/g/ release 2 (11.2) on that server. Pinning a node is required for rolling upgrade to Oracle Clusterware 11.2 and will be done automatically. We have seen cases where customer perform a manual upgrade and this would fail due to unpinned nodes. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 140
  141. 141. Grid Infrastructure Installation 11.2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 141
  142. 142. Grid Infrastructure Installation 11.2 Node Selection and SSH Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 142
  143. 143. Grid Infrastructure Installation 11.2 Grid Home Make sure that BASE and SW location are different subdirectories – the slide has it the wrong way!!! Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 143
  144. 144. Grid Infrastructure Installation 11.2 Setup ASM Roles Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 144
  145. 145. Grid Infrastructure Installation 11.2 Cluster Verification Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 145
  146. 146. Grid Infrastructure Installation 11.2 Cluster Verification Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 146
  147. 147. Grid Infrastructure Installation 11.2 Cluster Verification root> /tmp/CVU_11.2.0.1.0_grid/runfixup.sh Response file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.response Enable file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.enable Log file location: /tmp/CVU_11.2.0.1.0_grid/orarun.log Setting Kernel Parameters... fs.file-max = 327679 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.wmem_max = 262144 net.core.wmem_max = 1048576 uid=501(grid)gid=502(oinstall)groups=502(oinstall), 503(asmadmin),504(asmdba) Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 147
  148. 148. Grid Infrastructure Installation 11.2 Cluster Verification Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 148
  149. 149. Grid Infrastructure Installation 12c Management Repository Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 149
  150. 150. Grid Infrastructure Installation 12c Management Repository Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 150
  151. 151. Clusterware - ASM - DB Compatibility Note: 337737.1 a) The Matrix is valid after the (rolling) upgrade has been completed. During the upgrade you may use an older ASM version. b) The ASM version needs to be at least 10.1.0.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 151
  152. 152. Oracle Clusterware & ASM Upgrade  Documentation: – Oracle Clusterware Administration and Deployment Guide 11g http://download.oracle.com/docs/cd/E11882_01/rac.112/e16794/toc.htm  Grid Infrastructure Upgrade Known Issues: –  Oracle Clusterware rolling upgrade: –  Note: 948456.1: Pre 11.2 Database Issues in 11gR2 Grid Infrastructure Note: 338706.1: Oracle Clusterware Rolling Upgrades RAC Best Practices Starter Kit: – –  Note:810394.1: RAC Assurance Support Team: RAC and Oracle Clusterware Starter Kit and Best Practices (Generic) Also see platform-specific notes linked from the generic starter kit Upgrading an ASM instance with OUI within Oracle Clusterware upgrade: OUI or asmca –upgrade – http://docs.oracle.com/cd/E11882_01/server.112/e16102/asminst.htm#CHDGFHDC Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 152
  153. 153. Oracle Grid Infrastructure Patch Sets  Oracle Grid Infrastructure Patch Set 11.2.0.3: Patch set is a bit misleading: it’s a full release! – Installation is out-of-place only into a separate home – To upgrade from GI 11.2.0.1 to GI 11.2.0.2 or later: –  Apply PSU 11.2.0.1.2 (or newer) in-place – – – Rolling upgrade ASM issue for 11.2.0.1=>11.2.0.2 (bug 9329767) Rolling upgrade ASM issue for 11.2.0.2=>11.2.0.3 (bug12539000) RAC/Grid Infrastructure Upgrade Note:   – Note:810394.1: RAC Assurance Support Team: RAC and Oracle Clusterware Starter Kit and Best Practices (Generic) Also see platform-specific notes linked from the generic starter kit VERY IMPORTANT:  Follow all instructions in Note:1212703.1 – –  Make sure MULTICAST is setup correctly Note:1054902.1 – section D Make sure to check Oracle Database Readme 11g Release 2 Section 1.37 - "Open Bugs“ Then upgrade GI within OUI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 153
  154. 154. Oracle EXADATA 11.2.0.3 Patching  11.2.0.1/11.2.0.2 to 11.2.0.3 Database Upgrade on Exadata Database Machine in Note:1373255.1 – MULTICAST is already setup correctly on a Database Machine V2  For certification, recommendations, issues, current patches etc. see Note:888828.1 Database Machine and Exadata Storage Server 11.2 Supported Versions Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 154
  155. 155. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Database software installation: – Oracle Database 11.2.0.3 – Oracle Database 10.2.0.1 plus patch set 10.2.0.5 5TB Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 155
  156. 156. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Download preupgrade check script utlu112i.sql – See MOS Note:884522.1  Run utlu112i.sql in the source database – Without script execution the upgrade won't proceed 5TB Copy utlu112i.sql or download it 884522.1 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 156
  157. 157. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Note 452924.1 - How to Prepare Storage for ASM – Raw disk – Logical unit numbers (LUNs) – Raw logical volumes (LVM)  LVM configurations are not recommended – NFS files  Suitable for testing only 5TB Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 157
  158. 158. Configuring ASM with ASMCA Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 158
  159. 159. Configuring ASM with ASMCA Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 159
  160. 160. Configuring ASM with ASMCA DB0 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 160
  161. 161. Configuring ASM with ASMCA Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 161
  162. 162. Case 2: Upgrade RAC and move to ASM  RAC Database migration to a new cluster including upgrade Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Restore Online Backup for Standby Prepare Environment and ASM Activate and Upgrade Post Upgrade Actions 5TB 4 hrs Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 162
  163. 163. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Source Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Destination Make sure archive logging is on Switch on Force Logging Create identical trace file structure Copy Online Backup to DESTINATION Create a password file with identical PW Adjust init.ora Adjust init.ora Adjust tnsnames.ora Adjust listener.ora and tnsnames.ora Restore backup into ASM Adjust controlfile names Switch on log transport 5TB Switch on managed recovery mode Restore backup 5TB Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 163
  164. 164. Restore Backup into ASM  Make sure the backup is available on DESTINATION – rman target / connected to target database (not started) – RMAN> startup nomount – RMAN> restore spfile to pfile "$ORACLE_HOME/dbs/initSTY.ora" from "$ORACLE_BKD/my.spfile";  Modify init.ora: – *.db_create_file_dest=’+DG1′ – *.db_recovery_file_dest=’+FRA1′  Connect again with RMAN to restore the backup into ASM – rman target sys/password@source auxiliary / – RMAN> startup auxiliary nomount; – RMAN> duplicate target database for standby dorecover;  Move OCR and Voting Disk from ASM to raw  Rename controlfiles and switch on log transport and recovery Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 164
  165. 165. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Stop on production  Final synchronisation and activate standby  Upgrade – SQL> @?/rdbms/admin/catupgrd.sql – SQL> @?/rdbms/admin/catuppst.sql – SQL> @?/rdbms/admin/utlrp.sql 5TB 5TB Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 165
  166. 166. Synch and Activate Standby  Stop the application on SOURCE  Get the last changes written into logfiles on all nodes – SQL> alter system archive log current;  Stop the production database on SOURCE – $> srvctl stop database -d PROD  Check if logfile got shipped and applied  Stop managed recovery for the standby on DESTINATION – SQL> alter database recover managed standby database cancel; – SQL> shutdown immediate;  Bring the standby back in mount and initiate the activation: – SQL> alter database recover managed standby database finish skip standby logfile; – SQL> alter database commit to switchover to primary:  Create temporary tablespaces Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 166
  167. 167. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Register the database and its instances to Clusterware – $> srvctl add database -d PROD -o /oracle/base/product/11.2.0/dbhome -p '+DG1/prodspfile.ora' – $> srvctl add instance -d PROD -i PROD1 -n mynode1 – If you upgrade without moving to new hardware you'll execute:  $> srvctl upgrade database –d <SID> -o <new$OH> 5TB 5TB Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 167
  168. 168. Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Prepare Environment and ASM Preupgrade Checks Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions  Advance ASM diskgroup compatibility – ASMCA> alter diskgroup data set attribute 'compatible.asm'='11.2'; – ASMCA> alter diskgroup data set attribute 'compatible.rdbms'='11.2';  Move OCR and Voting into ASM – $> ocrconfig -add +data – $> ocrconfig -delete /dev/raw/raw1 – $> crsctl replace votedisk +VOTING  Set CLUSTER_DATABASE to TRUE and start the instances on all nodes 5TB 5TB Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 168
  169. 169. Important Notes and White Papers  TWP: Migration to Oracle ASM http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2asmmigrationwithdg-133513.pdf  Note 452924.1 - How to Prepare Storage for ASM  Note 265633.1 - ASM Technical Best Practices  Note 249992.1 - New Feature on ASM (Automatic Storage Manager)  Note 345180.1 - How to duplicate a controlfile when ASM is involved  Note 252219.1 - Steps To Migrate/Move a Database From Non-ASM to ASM And Vice- Versa  Note: 787793.1 - Creating a physical standby from ASM primary – Note:1079563.1 - RMAN duplicate support for mixed platform – Note: 430278.1 - Can you restore RMAN backups taken on 32-bit Oracle with 64-bit Oracle? Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 169
  170. 170. Case 2: Summary  RAC Database migration to a new cluster including upgrade 5TB 5TB 4 hrs Oracle 10.2.0.5 Oracle 10.2.0.5 Oracle 11.2.0.3 RHEL4 – 32bit PHYSICAL STANDBY OEL5.8 64bit Install and patch: GI and DB 11.2.0.3 DB 10.2.0.5 Preupgrade Checks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Prepare Environment and ASM Restore Online Backup for Standby Upgrade, Migrate and Consolidate to Oracle Database 12c Activate and Upgrade Post Upgrade Actions 170
  171. 171. Real World Checkpoint Customer Project  The Customer: Interhyp AG – HQ in Munich, Germany – Bank for residential and Constraints Preparation development financing – Offering banking service to other German key banks as well – 100% subsidiary of Dutch ING Bank Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 171
  172. 172. Real World Checkpoint Customer  Project scope: – Upgrade 6x 2-node-RAC systems all on Project Constraints Preparation Oracle 10.1.0.5 on RH Linux 32bit – Target:  Oracle RAC 11.2.0.2 with ASM  RH Linux 64bit – Hardware exchange for key systems  4-node cluster Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 172
  173. 173. Real World Checkpoint Customer  Constraints: – Downtime window limited to 4 hrs per database  Migrations to be done serially, not in parallel Project – Not the fastest network connection Constraints – LOBs in the source database  First tests with Data Pump on NETWORK_LINK Preparation didn't fit into the downtime requirements Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 173
  174. 174. Real World Checkpoint Customer  Prepare new cluster – Install Oracle Grid Infrastructure 11.2 and patch it Project – Decrease upgrade duration to ~30 minutes  Remove unused components from production Constraints database Preparation Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 174
  175. 175. Real World Checkpoint Customer Project Constraints Preparation  Build up a physical standby database on the new cluster – Oracle 10.1.0.5  Oracle 10.1.0.5 within 11.2 ASM Note: This is officially not supported but will work – Goal: Activate and upgrade the standby database  Advantage: This can be tested many times without impacting the production system Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 175
  176. 176. Real World Checkpoint Customer  Upgrade – Activate standby and start in STARTUP UPGRADE Project Constraints  Invalidate and compile all packages/code (32bit  64bit!) – Register database to Clusterware and move OCR/Voting to ASM Preparation Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 176
  177. 177. Real World Checkpoint Customer  Live? And alive? – Yes!!! Go Live: 27-NOV-2010 Project – Total downtime: ~2 hours – Database upgrade time: Constraints 24 minutes + 5 minutes recompilation – Very robust using the entire Oracle software stack Preparation Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 177
  178. 178. Real World Checkpoint Customer  Well ... the optimizer ... – We found some optimizer issues Project  Reports were affected  Remedy: Hints, rewrite and patches plus SQL Constraints Profiles Preparation Upgrade Success? Remarks Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 178
  179. 179. Introduction & Overview General Preparation Steps Upgrade & Migration Cases Endianness Migration Fallback Strategies New Features in Oracle 12c Performance Management Wrap Up Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 179
  180. 180. Case 3: Cross Endianness Migration  Migration of a single instance database to Exadata Example Facts & Description 1. Hardware migration to an Exadata Database Machine 2. Cross Endianness database migration from Oracle 9.2.0.8 to Oracle 11.2.0.3 3. Maximum tolerated downtime: 24 hours 4. Database size: 8TB 8TB 8TB 24 hrs Oracle 9.2.0.8 Oracle 11.2.0.3 HP-UX OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 180
  181. 181. Case 3: Cross Endianness Migration  Options with Oracle 9i: – exp and imp  Import of all versions  Oracle V5 possible – exp is not supported for general use since Oracle 11g » But the utility is still there and can be used – imp is still supported for importing older dumpfiles  Neither fast nor reliable nor comfortable 8TB 8TB 24 hrs Oracle 9.2.0.8 Oracle 11.2.0.3 HP-UX OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 181
  182. 182. Case 3: Cross Endianness Migration  Options since Oracle 10g: – Data Pump expdp and impdp  Usally the first option as it is easy and powerful – Cross platform Transportable Tablespaces (TTS)  More complicated, more manual steps than Data Pump SWING 8TB 8TB 8TB 24 hrs Oracle 9.2.0.8 Oracle 11.2.0.3 Oracle 11.2.0.3 HP-UX HP-UX OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 182
  183. 183. Case 3: Cross Endianness Migration  Migration of a single instance database to Exadata Prepare a new database on EXADATA Restore online backup to SWING Upgrade database on SWING Full database import via NETWORK_LINK Post Migration Actions SWING 8TB 8TB 8TB 24 hrs Oracle 9.2.0.8 Oracle 11.2.0.3 Oracle 11.2.0.3 HP-UX HP-UX OEL5.8 64bit Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 183
  184. 184. Data Pump Overview  The “new” faster export-import – Available starting with Oracle 10.1 – Powerful concept:  Restartable via job interface  Command line and API (DBMS_DATAPUMP)  PARALLEL export and import of data (single-threaded for metadata)  EXCLUDE & INCLUDE (For examples see MOS Note:341733.1)  COMPRESS=ALL starting in Oracle 11.1 (requires Advanced Compression Option)  NETWORK_LINK for direct import via a database link  Master Note for Data Pump: MOS Note:1264715.1  For Compatibility and version changes: MOS Note:553337.1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 184
  185. 185. Data Pump Overview  Limitations – Not compatible with "old" exp/imp  "Old" par files can be used since Oracle 11.2 with the legacy interface, but will not take advantage of new features such as parallelism  “Old” exp dump files cannot be imported by Data Pump – Restrictions:  For Oracle 10.2, handles everything except for XMLSCHEMA types  As of Oracle 11.1, handles all data types  Known Issues: Master Note for Data Pump: MOS Note:1264715.1 – LONG and LOB data  Generally slow because of the data type implementation  STRONG RECOMMENDATION to migrate to SecureFiles – Data Pump can work in parallel on SecureFiles type – New in Oracle 12c: TRANSFORM=LOB_STORAGE:SECURE_FILE Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 185
  186. 186. Data Pump Best Practices  For full exports the role EXP_FULL_DATABASE is required  For export consistency use: – FLASHBACK_TIME=SYSTIMESTAMP  This will increase UNDO requirements for the duration of the export  Always set parameters: – EXCLUDE=STATISTICS – METRICS=YES  Speed up Data Pump: – PARALLEL=n  Typically n = 2x <number of CPU cores> – EXCLUDE=INDEXES on import 1. Initial impdp with EXCLUDE=INDEXES 2. Second impdp with INCLUDE=INDEXES SQLFILE=indexes.sql 3. Split indexes.sql into multiple SQL files and run in multiple sessions Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 186

×