SlideShare a Scribd company logo
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
to Oracle Database 12c
Roy Swonger
Senior Director & Product Manager
Database Upgrade & Utilities
Oracle Corporation
Updated: 28-NOV-2015
Upgrade, Migrate & Consolidate to Oracle Database 12c
Mike Dietrich
Master Product Manager
Database Upgrade
Oracle Corporation
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
$> whoami
2
20 years w/Oracle
Previously with DEC Rdb
11+ years managing
Data Pump
Database Upgrade
SQL*Loader
Transportable Tablespaces
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
$> whoami
3Upgrade, Migrate & Consolidate to Oracle Database 12c
6 years
RDBMS Core & Mission Critical Support
5.5 years
Technology Presales for DataGuard, Upgrades
>7.5 years
ST Upgrade Development Team
50%
Reference
Projects
50%
Workshops
Worldwide
+ x%
Development
Work
Mike Dietrich
Master Product Manager
Database Upgrades & Migrations
MikeDietrichDE
http://blogs.oracle.com/UPGRADE
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
4Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Reference Involvement
Upgrade, Migrate & Consolidate to Oracle Database 12c 5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Reference Involvement: Results
>65000 Downloads
since June 2013
Upgrade, Migrate & Consolidate to Oracle Database 12c 6
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
When does
Oracle Database 11.2
run out of
Premier Support?
Already over since 31-Jan-2015
Upgrade, Migrate & Consolidate to Oracle Database 12c 7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Supported Versions
Upgrade, Migrate & Consolidate to Oracle Database 12c 8
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Oracle 10.1
(GA: Jan 2004)
Oracle 10.2
(GA: Jul 2005)
Oracle 11.1
(GA: Aug 2007)
Oracle 11.2
(GA: Sep 2009)
Oracle 12.1
(GA: Jun 2013)
Oracle 12.2
(GA: xxx 2016)
today
Premier Support Waived Extended Support Paid Extended Support Sustaining Support
Jan 2009 Jan 2012
Jul 2010 Jul 2013
Aug 2012 Aug 2015
Jan 2015
Jun 2018 Jun 2021
Dec 2020May 2017
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Patching for Oracle Database 11.2
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Oracle 11.2
(GA: Sep 2009)
Oracle 12.1
(GA: Jun 2013)
Oracle 12.2
(GA: xxx 2016)
Upgrade, Migrate & Consolidate to Oracle Database 12c 9
Jun 2018 Jun 2021
Jan 2015 Dec 2020May 2017
• Release Schedule of
Current Database Releases
MOS Note.742060.1
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
When will
Oracle Database 12.2
be released?
Let's be honest – you will wait usually for the
1st patch set for the 2nd release
Upgrade, Migrate & Consolidate to Oracle Database 12c 10
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Why you can't wait for the 2nd Release?
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Oracle 11.2
(GA: Sep 2009)
Oracle 12.1
(GA: Jun 2013)
Oracle 12.2
(GA: xxx 2016)
Upgrade, Migrate & Consolidate to Oracle Database 12c 11
Jun 2018 Jun 2021
 Every release is a full release
 Every release will get a significant
number of new features and changes
 There's no such thing as THE
2nd release anymore! 0 10 20 30 40 50
Oracle 9.2 .. 10.1
Oracle 10.1 .. 10.2
Oracle 10.2 .. 11.1
Oracle 11.1 .. 11.2
Oracle 11.2 .. 12.1
Oracle 12.1 .. 12.2
Span between Releases in Months
Patchset
Jan 2015 Dec 2020May 2017
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Lifetime Support Policy
 http://www.oracle.com/us/support/
lifetime-support/index.html
 MOS Note: 209768.1 for Support Policy
Explanation and details
12Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Companion
 MOS Note:1462240.1 Upgrade Companion 12c
13Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Upgrade: OTN Web Site
 http://otn.oracle.com/goto/upgrade
Upgrade, Migrate & Consolidate to Oracle Database 12c 14
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Upgrade Blog
 http://blogs.oracle.com/UPGRADE
Upgrade, Migrate & Consolidate to Oracle Database 12c 15
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Try the Upgrade: Hands On Lab
 http://blogs.oracle.com/UPGRADE
Upgrade, Migrate & Consolidate to Oracle Database 12c 16
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Internal Only Download Page
 http://database.us.oracle.com/pls/htmldb/f?p=301:193:0
Upgrade, Migrate & Consolidate to Oracle Database 12c 17
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Who's already live on Oracle Database 12c?
Winners are live on Oracle Database 12c already 
Upgrade, Migrate & Consolidate to Oracle Database 12c 18
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
– Michael Kuhn, Deutsche Vermögensberatung AG
“At DVAG we do thorough testing in a 3-step
approach for our critical environments.
The decision to upgrade directly to Oracle
Database 12c skipping the terminal patch set of
the previous database release was taken in order
to save us one complete testing cycle, and
furthermore the accompanying costs as well"
19Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Anja Albrecht, Rechenzentrum der Finanzverwaltung NRW
"The migration of all 16 German Electronic
Income Tax databases to Oracle Database 12c
in less than 10 months went smooth and fine.
We are very satisfied with the performance
and the robustness of Oracle Database 12c."
20Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
http://www.oracle.com/technetwork/issue-archive/2015/15-may/o35diemobiliar-2541568.html
Upgrade, Migrate & Consolidate to Oracle Database 12c 21
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Time to Upgrade?
Upgrade, Migrate & Consolidate to Oracle Database 12c 22
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Terminology: Upgrade vs. Migration
 Upgrade
– Independent of size
 Migration
– Usually depending on size
23Upgrade, Migrate & Consolidate to Oracle Database 12c |
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Why people usually don't upgrade?
"You need to upgrade
now as your release is
out of Premier Support
already!!!"
"Upgrading just
costs a lot!" "I don't see any benefits by
upgrading to a newer release"
"It will just introduce
new bugs and issues"
"I'm happy with the
features of Oracle 8i"
Upgrade, Migrate & Consolidate to Oracle Database 12c 24
"We'll wait for the
2nd release only"
"Application is not certified"
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle and SAP – Certified in Oracle Database 12.1.0.2
 SAP has already certified Oracle
12.1.0.2 as of March 31, 2015
 For certified Oracle options see:
– http://www.oracle.com/us/solutions/
sap/sap-database/index.html
 SAP has already certified Oracle
12.1.0.2 with In-Memory as of
June 30, 2015
– http://tinyurl.com/CertOracleSAP-InMem
Upgrade, Migrate & Consolidate to Oracle Database 12c 25
 http://tinyurl.com/CertOracleSAP
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
The Magic Questions
 We need to know ...
– New hardware?
– Same or different OS? OS version?
– Character Set change?
– Single Tenant / Multitenant?
– Number of databases?
– Size of databases?
– Exact database source and target versions?
– Downtime and fallback requirements?
– Test environment and tools?
Upgrade, Migrate & Consolidate to Oracle Database 12c 26
…
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Are you maintaining a Zoo?
3 different OS families  7 different major Oracle releases
6 of 8 OS desupported  77 of 80 databases out of Support*
Upgrade, Migrate & Consolidate to Oracle Database 12c 27
* in Feb 2014
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Maintaining a Zoo is EXPENSIVE
Maintenance Costs
Upgrade/Migration Costs
Upgrade, Migrate & Consolidate to Oracle Database 12c 28
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Another example from the Real World
OS change Client changeApplication change HW change
Minimal Downtime between Oracle 7.3 and Oracle 11.210-15 databases
No upgrade done for ~17 years!!!
Upgrade, Migrate & Consolidate to Oracle Database 12c 29
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade/Migrate Older Oracle Releases
Oracle 8i
Less
Downtime?
Oracle 9i
Oracle 5/6/7/8
Oracle 10.1
Oracle 9.2
Near-Zero
Downtime?
exp/imp
Transportable
Tablespaces
Same platform only GoldenGate+
Upgrade, Migrate & Consolidate to Oracle Database 12c 30
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Options to Oracle Database 12c
Oracle 11.1
Less
Downtime?
Oracle 11.2.0.2
Oracle 10.2
Oracle 11.2.0.3/4
Near-Zero
Downtime?
Transportable
Tablespaces
Logical
Standby
GoldenGat
e+
Transient
Standby
Full Transportable
Export/Import
RMAN Inc
Bck+
expdp/impdp
catctl.pl
DBUA HW
Upgrade, Migrate & Consolidate to Oracle Database 12c 31
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Migration Options to Oracle Database 12c
Oracle 11.1
Less
Downtime?
Oracle 11.2.0.1/2
Oracle 10.2
Oracle 11.2.0.3/4
Near-Zero
Downtime?
GoldenGat
e+
Full Transportable
Export/Import
RMAN Inc
Bck+
Transportable
Tablespaces
expdp/impdp
SQL*Loader
CTAS, COPY
TDB Only same
Endianness
Upgrade, Migrate & Consolidate to Oracle Database 12c 32
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Step-by-Step Strategy
– In pieces over time
– Risk mitigating
 Big-Bang Strategy
– All in one downtime window
– Sometimes necessary due
to dependencies
 Least Critical First
– Learn more with every step
 Most Critical First
– Learn about almost all from
the beginning
Upgrade/Migration Strategies?
33Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Approach?
Planning
Data
Gathering
Testing
Upgrade/
Migration
Go-Live
Quarterly
Patching
Upgrade, Migrate & Consolidate to Oracle Database 12c 34
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Phases
1
• Data Gathering Phase
•The more you know the better it is!
2
• Test Phase
3
• Upgrade/Migration Phase
4
• Go-Live Phase
5
• Future Phase
 Application:
 Owner?
 Version?
 Dependencies?
 Certification?
 Timeframe?
 Test budget?
 Database:
 Owner?
 Exact version and patches?
 Size?
 Downtime?
 Dependecies?
 Gateways?
 Operating system version?
Upgrade, Migrate & Consolidate to Oracle Database 12c 35
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Phases
1
• Data Gathering Phase
2
• Test Phase
•Test, test, test ... and test!!!
3
• Upgrade/Migration Phase
4
• Go-Live Phase
5
• Future Phase
 1:1 test systems?
 Documentation?
 Network bandwidth?
 Performance data from PROD?
 Testing tools: RAT?
 Batches, long-ops?
 Multiple successful test runs?
 Performance protection?
 Be open to late patches/PSUs!
 Fallback strategy tested?
Upgrade, Migrate & Consolidate to Oracle Database 12c 36
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Phases
1
• Data Gathering Phase
2
• Test Phase
3
• Upgrade/Migration Phase
•Relax ...
4
• Go-Live Phase
5
• Future Phase
 Is everybody informed?
 Relax and lean back!
 Don't overtestosteronize!!
Upgrade, Migrate & Consolidate to Oracle Database 12c 37
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Phases
1
• Data Gathering Phase
2
• Test Phase
3
• Upgrade/Migration Phase
4
• Go-Live Phase
•Keep an extra eye on performance
5
• Future Phase
 Monitor performance behaviour
 Any issues?
 Use collected data from pre-
upgrade to fix issuse
 Open an SR with Support
Upgrade, Migrate & Consolidate to Oracle Database 12c 38
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Project Phases
1
• Data Gathering Phase
2
• Test Phase
3
• Upgrade/Migration Phase
4
• Go-Live Phase
5
• Future Phase
•It's not over now ... It just started!!!
 Don't lean back – it just started!
 Patching strategy?
 Next available PSU?
 Next available patch set?
 When will be the next upgrade?
 Adopt useful new features
 Many features come for free
Upgrade, Migrate & Consolidate to Oracle Database 12c 39
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
40Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Make sure everything is in good shape ...
 So that you don't go off the rails!
41Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Preparation Checklist
 In the SOURCE environment:
 Empty the recycle bin
 Check for INVALID objects in SYS & SYSTEM
 Check for duplicate objects in SYS & SYSTEM
 Check for INVALID components
 Check for mandatory components
 Remove obsolete components
 Preserve performance statistics
 Check network performance
Clean Up
Components
Performance
 Perform Integrity checksOptional
42Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Clean Up: Recycle Bin
 Especially before patch set
or release upgrade purge
the recycle bin:
– Since Oracle 12c this will be done
by the preupgrade_fixups.sql
 General recommendation:
– Empty the recycle bin at least
once per week with an automatic
job during off-peak times
Upgrade, Migrate & Consolidate to Oracle Database 12c 43
purge DBA_RECYCLEBIN;
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Clean Up: Invalid Objects
 Check for INVALID objects
– There should be no invalid
objects in Oracle supplied
user schemas – especially
none owned by SYS or SYSTEM
– Recompile invalid objects
before upgrade/migration
Upgrade, Migrate & Consolidate to Oracle Database 12c 44
select unique
OBJECT_NAME, OBJECT_TYPE,
OWNER from DBA_OBJECTS
where STATUS='INVALID'
order by OWNER;
@?/rdbms/admin/utlrp.sql
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Clean Up: Duplicate Objects
 Always check for
DUPLICATE objects
in SYS & SYSTEM
 To clean up use script
but only under Oracle
Support's supervision
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');
45Upgrade, Migrate & Consolidate to Oracle Database 12c
select 'DROP ' || object_type || ' SYSTEM.' || object_name || ';' 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');
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Components: Validation Check
 Make sure all components
are VALID before upgrade
– Components are INVALID?
– If that does not correct
component status, further
diagnosis might be required
Select COMP_ID, COMP_NAME,
STATUS, VERSION from
DBA_REGISTRY where
STATUS<>'VALID';
@?/rdbms/admin/utlrp.sql
MOS Note:472937.1:
Information On Installed Database Components
MOS Note:753041.1:
How to diagnose Components with NON VALID status
46Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Components: Mandatory Components
 General recommendation:
– Standardize the set of installed database components throughout your environment
 XDB component is mandatory in Oracle Database 12c
47Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Components: Removal
 Potential reasons to remove components:
– A component does not exist
anymore in Oracle Database 12c
– Speed up the upgrade process
– A component is obsolete
– Further information on our Blog:
EM Database Control Repository
UltraSearch
Rules Manager & Expression Filter
OLAP AMD
EM Database Control Repository
EM Cloud Control
http://tinyurl.com/ComponentCleanup
48Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance: Preserve Statistics
 Gather accurate performance statistics from production
– Accurate means: Starting at least 1 month before the upgrade
– Use Automatic Workload Repository (AWR)
 Snapshots interval 30-60 minutes and retention ~40 days
 Extract AWR: SQL>
 Performance snapshot comparison using AWR DIFF reports:
SQL>
– Please note: AWR usage requires a Diagnostic Pack license
– Alternative: STATSPACK MOS Note:466350.1 and MOS Note1931103.1
 MOS Note:1477599.1 Best Practices Around Data Collection For Performance Issues
@?/rdbms/admin/awrextr.sql
select * from table(
DBMS_WORKLOAD_REPOSITORY.AWR_DIFF_REPORT_HTML(<DBID>
, 1, 101, 121, <DBID>, 1, 201, 221));
49Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 50
25%
of +Terabyte Migrations get
delayed or fail because of
insufficient network hardware,
setup or bandwidth
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance: Network Bandwidth
Interface Net Data
Volume
Theoretical
Transfer
Throughput
Real World
Transfer Throughput
100 Mbit Ethernet 11 MB/sec 40 GB/hour <30 GB/hour
1 Gbit Ethernet 110 MB/sec 400 GB/hour <300 GB/hour
10 Gbit Ethernet 1100 MB/sec 4000 GB/hour <3000 GB/hour
Infiniband IB 4xQDR 4000 MB/sec 14400 GB/hour <11000 GB/hour
51Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance: Network Strategies
Issue Solution
Amount of data not transferable?  Move historical data upfront
 Use Data Guard or Turbo TTS
All transfer types single threaded? Parallel scp, ftp, NFS ...
Slow hardware? Parallel network cards, replacements
Different network segments? Replace old switches/router or check for
alternative routes or direct wiring
External networks? Check upfront bandwidth over distance
Still not enough bandwidth? Sneakernet:
52Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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 faster performance
 Can be run on selected data files or tablespaces only as well
53Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Preparation Checklist
 In the TARGET environment:
 Software Certification Information
 Installation Requirements
 Software and Patch Sets
 CPUs, PSUs and Bundle Patches
 Single Patches
 Parameter Recommendations
Checks
Download
Settings
54Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
55Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Software Download
Base Release (and Oracle 12.1.0.2) Patch Sets, PSUs, Patches
Oracle Software Cloud:
http://edelivery.oracle.com/
Oracle Tech Network:
http://otn.oracle.com/indexes/downloads/index.html
My Oracle Support:
http://support.oracle.com
56Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Database Standard Edition 12.1.0.2 SE2
 Oracle Database 12c - Availability  http://tinyurl.com/12102SE2-download
Upgrade, Migrate & Consolidate to Oracle Database 12c 57
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Installation of the new Software
 Install newest PATCH SET or base release
(Every patch set is a full release since Oracle Database 11.2)
 Apply newest available Patch Set Update (PSU)
or Bundled Patch (BP)
 Apply Interim Patches for known issues
Patch Set /
Base Release
PSU / BP
Patches
 Now: Start the database upgrade/migration!!!Upgrade
58Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Overview of Database Patch Delivery Methods
 MOS Note: 1962125.1
– Including testing
recommendations
Upgrade, Migrate & Consolidate to Oracle Database 12c 59
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Testing Recommendations by Patch Type
 MOS Note: 1962125.1
60Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Example: Patch Set 12.1.0.2
 Download patch set 12.1.0.2 from http://support.oracle.com
61Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Patch Set Installation 11.2.0.4 / 12.1.0.2
 Default: Out-of-place patch upgrade!!! It’s a full release!!!
– If you specify an in-place patch upgrade:
62Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
In-place Patch Set Installation 11.2.0.4 / 12.1.0.2
 Only way to do an in-place patch set installation
– Example
 Backup your /dbs and /network/admin files
 ./runInstaller –detachHome ORACLE_HOME=<old-home>
 Remove your previous-home contents
 Install 11.2.0.4/12.1.0.2 into the previous home
 Restore /dbs and /network/admin files
 Upgrade your database with DBUA or catupgrd.sql/catctl.pl
$ ./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.
63Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Unattended Installation/Configuration
 Oracle 11.2 – see MOS 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 $OH
 For further information (also OS related) see the
Oracle Database Server Installation Master Note:1156586.1
64Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Unattended Installation/Configuration
 Oracle Database 12c:


65Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Patching Notes by Release
MOS Note:161818.1
» Click on the releases number «
?
Oracle
11.2.0
MOS
Note:880782.1
Known Issues and
Alerts in 11.2.0.x
» Click on "Availability and
Known Issues" for your
patch releases «
MOS
Note:1562139.1
Availability and
Known Issues in
11.2.0.4
Check for:
Recommended Patches
Alerts
Notable Fixes
Issues Introduced
MOS Note:756671.1
Recommended Database
Patches
?
Oracle
12.1.0
MOS
Note:1565065.1
Known Issues and
Alerts in 12.1.0.x
» Click on "Availability and
Known Issues" for your
patch releases «
MOS
Note:1683799.1
Availability and
Known Issues in
12.1.0.2
Check for:
Recommended
Patches
Alerts
Notable Fixes
Issues Introduced
MOS
Note:756671.1
Recommended Database
Patches
66Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Check for important alerts: MOS Note:161818.1
Important Alerts and One-Off-Patches?
67Upgrade, Migrate & Consolidate to Oracle Database 12c
‘click’
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Information / Alerts
 Known issues in 12.1.0.x? See MOS Note:1565065.1
‘click’
68Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Information / Alerts
 Recommended Database Patches? See also: MOS Note:756671.1
69Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Recommended Patches: PSUs
 Always install the latest PSU as soon as possible
– Most important Notes: Note:854428.1: Introduction to Database PSU
Note:1227443.1: PSU Known Issues
– PSU contents:
– PSU characteristics:
– PSU schedule – 4x/year:
SPUs
Fixes for Critical Issues
Fixes  Recertification
Fixes  Configuration
RAC Rolling
Standby First
20-OCT-2015 / 19-Jan-2016 / 19-Apr-2016 / 19-Jul-2016
70Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Recommended Patches: PSUs
 Check for installed PSUs and patches
– PSU check: opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU'
– Since Oracle Database 12c
 DBMS_QOPATCH
– Documentation:
http://docs.oracle.com/cd/E16655_01/appdev.121/e17602/d_qopatch.htm#ARPLS74834
71Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Examples using DBMS_QOPATCH
 Check the inventory:
 Check if a specific patch got installed:
 Get patch details:
72Upgrade, Migrate & Consolidate to Oracle Database 12c
SQL> select xmltransform(DBMS_QOPATCH.GET_OPATCH_LSINVENTORY,
DBMS_QOPATCH.GET_OPATCH_XSLT) from dual;
SQL> select xmltransform(DBMS_QOPATCH.IS_PATCH_INSTALLED('19303936 '),
DBMS_QOPATCH.GET_OPATCH_XSLT) from dual;
Patch Information:
19303936: applied on 2015-02-20T11:32:11-09:00
SQL> select xmltransform(DBMS_QOPATCH.GET_OPATCH_LIST,
DBMS_QOPATCH.GET_OPATCH_XSLT) from dual;
Patch details: ...
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Information / Alerts
 Alerts and new issues with 12.1.0.2? MOS Note:1683799.1
73Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Information / Alerts
 Alerts and new issues with 12.1.0.2? MOS Note:1683799.1
74Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade Information / Alerts
 Alerts and new issues with 11.2.0.4? MOS Note:1562139.1
75Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Important Optimizer Issues and Fixes
 Things to consider before upgrade to Oracle Database 12.1.0.2 to avoid Poor
Performance or Wrong Results: MOS Note:2034610.1
– Things to consider before upgrade to Oracle Database 11.2.0.4 to avoid Poor Performance or Wrong Results: MOS Note:1645862.1
Things to consider before upgrade to Oracle Database 11.2.0.3 to avoid Poor Performance or Wrong Results: MOS Note:1392633.1
76Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Important SQL Plan Management Issues and Fixes
 Patches to Consider for 12.1.0.2 to Avoid Problems with SQL Plan
Management (SPM): MOS Note:2035898.1
– Patches to Consider for 11.2.0.4 to Avoid Problems with SQL Plan Management (SPM): MOS Note:2034706.1
Patches to Consider for 11.2.0.3 to Avoid Problems with SQL Plan Management (SPM): MOS Note: 1948958.1
77Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Important Optimizer Issues and Fixes – SPARC SOLARIS
 Things to Consider to avoid RDBMS Performance problems on SPARC
– For 12.1.0.2: MOS Note:1970525.1
– For 11.2.0.3 /11.2.0.4: MOS Note:1680269.1
78Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Recommended OS patches – Oracle Database 12c
 MOS Note:1587357.1
Oracle Database 12.1 Installation
and Configuration Requirements
Quick Reference for AIX, HP-UX,
Linux, Solaris and MS Windows OS
Upgrade, Migrate & Consolidate to Oracle Database 12c 79
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Patching for High Availability
80Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
1. Patch the Standby
2. Test Changes!!!!
3. Switchover
Patch the Standby First
Application Tier
Data Guard
 MOS Note:1265700.1 - Data Guard Standby-First Patch Apply
Post Switchover
Test
11.2.0.1
Upgrade, Migrate & Consolidate to Oracle Database 12c 81
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Out-of-Place Patching
DB
Instance
Apply Patches
Patches
Applied
Reduce the Downtime
Database
Home
Clone Home
Cloned
Database
Home
Upgrade, Migrate & Consolidate to Oracle Database 12c 82
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Rolling Real Application Cluster Patching
Zero Application Downtime
 Zero downtime rolling patch upgrade
across RACs
 Patch support node-by-node in a rolling
fashion
Upgrade, Migrate & Consolidate to Oracle Database 12c 83
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Online Patching aka Hot Patching
 Zero downtime for some patches
Patched
Shared
Library
1. Apply Shared Library
2. Map into text Area
3. Use new patched functions
Notes:
 Increases memory footprint
 Patch offline on next downtime
 P1 or diagnostic patches
MOS Note:761111.1
RDBMS Online Patching Aka Hot Patching
Upgrade, Migrate & Consolidate to Oracle Database 12c 84
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
– MOS Note:216205.1 DB Init Parameters for EBS R11i
– MOS Note:396009.1 DB Init Parameters for EBS R12
– Don't use OFE …
 alter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.3';
85Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Remove Outdated Parameters
 Example: 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
_push_join_union_view = FALSE
_push_join_predicate = FALSE
_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‘
Upgrade time
for ORDIM:
49minutes
Remove all
underscores
and events
Upgrade time
for ORDIM:
7 minutes
Factor
x7
86Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Why do we give parameter recommendations?
 June 6, 2012
https://www.pcworld.com/article/257045/6_5m_linkedin_passwords_posted_online_after_apparent_hack.html
87Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
SEC_CASE_SENSITIVE_LOGON
Values: { TRUE | FALSE }
Explanation: Enables or disables password case sensitivity
Annotation: Deprecated since Oracle 12c
Recommendation: Age out passwords having PASSWORD_VERSIONS<11G
When recreated, passwords will get salted
select USERNAME, PASSWORD_VERSIONS from DBA_USERS;
USERNAME PASSWORD_VERSIONS
---------- -----------------
APP_USER 10G 11G 12C
BOSS 10G
88Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
SQLNET.ALLOWED_LOGON_VERSION_SERVER
Values: { 8 | 10 | 11 | 12 | 12a }
 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
Explanation: Determines min. authentication protocol when connection to a DB
Annotation: ORA-28040 or ORA-3134 when lower client tries to connect
Recommendation: Set it to 12 in your sqlnet.ora file(s) if you don't connect with
<10.2.0.5 clients
89Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
AUDIT_TRAIL
Values: { none | os | db [, extended] | xml [, extended] }
Explanation: Enables or disables database auditing
Annotation:  AUD$ will be moved into SYS schema if OLS and/or DBV is installed
 Run olspreupgrade.sql from the 12c home
 http://docs.oracle.com/database/121/UPGRD/preup.htm#UPGRD60015
 Unified Auditing is enabled by default in MIXED MODE in a new DB
 http://docs.oracle.com/database/121/DBSEG/auditing.htm#DBSEG822
 SQL> select VALUE from V$OPTION where PARAMETER='Unified Auditing';
 To turn off default policies:
 SQL> noaudit policy ORA_SECURECONFIG;
 SQL> noaudit policy ORA_LOGON_FAILURES;
Recommendation: Make sure AUDIT_TRAIL is set correctly:
 NONE if you don't want to have traditional auditing on
 Any other value depending on your auditing needs
 For further information see: http://tinyurl.com/UnifiedAuditing
90Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
DEFERRED_SEGMENT_CREATION
Values: { TRUE | FALSE }
Explanation: New tables will not allocate segments until a row is inserted
Annotation: Default is TRUE since Oracle Database 11.2
 Tablespace must be locally managed
 COMPATIBLE ≥ 11.2.0
 Performance penalty when the first row is inserted
 May cause contention issues using many Data Pump workers
 See MOS Note 1216282.1
Recommendation: Set it to FALSE
except for rare cases where an application creates a large number of empty
tables with may never get used
91Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
JOB_QUEUE_PROCESSES
Values: { 0 – 1000 }
Explanation: Number of jobs being able to run concurrently in the database
Annotation: Default is 1000 since Oracle Database 11.1
 If set to 0 no recompilation will happen
 Too high settings can cause issues during concurrent stats gathering (new in 11.2)
Recommendation: Set it to number of physical/real CPU cores
http://tinyurl.com/job-queue-processes
92Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
_DATAFILE_WRITE_ERRORS_CRASH_INSTANCE
Values: { TRUE | FALSE }
Explanation: An I/O write error to ANY data file will crash the instance
Old behaviour (FALSE): 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
Annotation: Default behavior has changed since patch set 11.2.0.2
Change is documented in MOS Note: 7691270.8
Recommendation: Just be aware of this change
93Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
Upgrade, Migrate & Consolidate to Oracle Database 12c 94
MAX_STRING_SIZE
Values: { STANDARD | EXTENDED }
 STANDARD
 Length limits prior to Oracle Database 12c apply
 VARCHAR2/NVARCHAR2: 4000 bytes and RAW: 2000 bytes
 EXTENDED
 New 32767 byte limit applies
 Requires COMPATIBLE ≥ 12.0.0
Explanation: Controls the maximum size of VARCHAR2, NVARCHAR2, and
RAW data types
Annotation: Change from STANDARD  EXTENDED is allowed, but no way back
Database in UPGRADE mode: @?/rdbms/admin/utl32k.sql
Recommendation: Evaluate carefully as data will be stored in LOBs
http://docs.oracle.com/database/121/SQLRF/statements_3001.htm#i2181663
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
New Parameters in Oracle Database 12c
 Oracle Database 12.1.0.1
– 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
 Oracle Database 12.1.0.2
 –DBFIPS_140
 –COMMON_USER_PREFIX
 –DB_PERFORMANCE_PROFILE
 –ENABLE_GOLDENGATE_REPLICATION (11.2.0.4 and 12.1.0.2)
 –EXCLUDE_SEED_CDB_VIEW
 –INMEMORY_CLAUSE_DEFAULT
 –INMEMORY_FORCE
 –INMEMORY_MAX_POPULATE_SERVERS
 –INMEMORY_QUERY
 –INMEMORY_SIZE
 –INMEMORY_TRICKLE_REPOPULATE_SERVERS_PERCENT
 –OPTIMIZER_INMEMORY_AWARE
 –PDB_LOCKDOWN
 –PDB_OS_CREDENTIAL
95Upgrade, Migrate & Consolidate to Oracle Database 12c
http://tinyurl.com/Parameters12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Deprecated and Obsolete Parameters in Oracle Database 12c
 Oracle Database 12.1.0.1
– Deprecated:
 sec_case_sensitive_logon
– Obsolete:
 _app_ctx_vers
 _log_io_size
 Oracle Database 12.1.0.2
– Deprecated:
– Obsolete:
 parallel_fault_tolerance_enabled
96Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
97Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
1
Database
Upgrade
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Direct Upgrade to Oracle Database 12c
98Upgrade, Migrate & Consolidate to Oracle Database 12c
Oracle
9.2.0.8
Oracle
10.1.0.5
Oracle
10.2.0.5
Oracle
11.1.0.7
Oracle
11.2.0.2
Oracle
12.1.0.2
Oracle 9.2
(GA: Jul 2002)
Oracle 10.1
(GA: Jan 2004)
Oracle 10.2
(GA: Jul 2005)
Oracle 11.1
(GA: Aug 2007)
Oracle 11.2
(GA: Sep 2009)
DIRECT11.2.0.2
DIRECT11.1.0.7
DIRECT10.2.0.5
11.2.0.29.2.0.8
11.2.0.210.1.0.5
Please note: This graph will apply to database upgrades only!
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 preupgrd.sql
 Executes pre-upgrade checks
 Runs in source environment
 Generates fixup scripts
– preupgrade_fixups.sql
– postupgrade_fixups.sql
 MOS Note:884522.1
New Pre-Upgrade Script
Upgrade SQL Automation
Upgrade, Migrate & Consolidate to Oracle Database 12c 99
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
40%
Faster Upgrades in
Oracle Database 12c
Upgrade, Migrate & Consolidate to Oracle Database 12c 100
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 catctl.pl
 Runs database upgrade in parallel
 Up to 40% faster upgrade
 Used and proven by selected Oracle
Database 11g global customers
– Telco billing
– >100 SAP systems
– Large DWH
New Parallel Upgrade
Faster Upgrade – Less Downtime
catctl.pl
script3.sqlscript2.sqlscript1.sql
script4.sql
script5.sql
script6.sql
script6.sql
script7.sql
script8.sql
script9.sql
script10.sql
script11.sql
Upgrade, Migrate & Consolidate to Oracle Database 12c 101
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Harald Stefan
Leiter Datenbanken
Payback GmbH
“The new parallel upgrade script promises to drastically
reduce downtime due to planned maintenance. We saw a
37% improvement over the previous upgrade process in our
environment.”
Upgrade, Migrate & Consolidate to Oracle Database 12c 102
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
New Parallel Upgrade
Faster Upgrade – Less Downtime
$> $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql
Upgrade, Migrate & Consolidate to Oracle Database 12c 103
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Pre-Upgrade Automation
 Parallel Upgrade
 RMAN Integration
 Guaranteed Restore Points
 Activity and Alert Log
Database Upgrade Assistant
Simplified Upgrade
Upgrade, Migrate & Consolidate to Oracle Database 12c 104
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Daniel Overby Hansen
Chief Software Developer, Environment Operation
SimCorp A/S - Denmark
“We experienced very few problems and in general the
upgrades were very fast.
We were able to upgrade almost all of our 200+ database
instances to Database 12c with a downtime of only 30-40
minutes (and that includes some of the pre- and post-tasks).
I have been upgrading Oracle databases since 9i to 10g, and
this has been the best release (measured on how easy
upgrading is) so far."
Upgrade and Migrate to Oracle 12c - Live and Uncensored! 105
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Mass Upgrades
 Grid Infrastructure Upgrades
 RAC Database Upgrades
 Standby Database Upgrades
 Licensed in Lifecycle Management Pack
EM Cloud Control
Enterprise Manager Mass and RAC Upgrades
Upgrade, Migrate & Consolidate to Oracle Database 12c 106
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Differences Upgrade to Oracle 11.2 vs Oracle 12c
Upgrade to
Oracle Database 11.2
Upgrade to Oracle Database 12c
Preupgrade check: utlu112i.sql preupgrd.sql
Status information: Limited Detailed with many recommendations
Fixup scripts: No Yes – pre and post upgrade
Upgrade script: catupgrd.sql catctl.pl
Parallel: No Up to 8 parallel threads – default: 4
Error handling: No Any errors in the ORACLE SERVER
upgrade will lead to status INVALID
Upgrade, Migrate & Consolidate to Oracle Database 12c 107
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Upgrade to Oracle Database 12c
 Database upgrade including migration to a new server
Oracle 10.2.0.5
RHEL4 – 32bit
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
1TB
108Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
Upgrade
Database
Post
Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
109Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 10.2.0.5
RHEL4 – 32bit
 Installation of Oracle Database 12c
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
110Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 10.2.0.5
RHEL4 – 32bit
 PSU (MOS Note:756671.1) and patches (MOS Note:1565082.1)
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
111Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Download/execute newest preupgrade scripts: MOS Note:884522.1
– preupgrd.sql and utluppkg.sql
– Files can be found in Oracle 12c's ?/rdbms/admin as well
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
Oracle 10.2.0.5
RHEL4 – 32bit
112Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 preupgrd.sql generates 2 scripts and 1 log for review
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
$ORACLE_BASE/cfgtoollogs/<SID>/preupgrade
- preupgrade.log
- preupgrade_fixups.sql
- postupgrade_fixups.sql
Oracle 10.2.0.5
RHEL4 – 32bit
113Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Review preupgrade.log
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
Oracle 10.2.0.5
RHEL4 – 32bit
114Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 preupgrd.sql won't create output files if JAVAVM is:
– Not present
– Invalid
– Option off
Workaround:
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
$> cd $ORACLE_BASE/cfgtoollogs
$> mkdir <DB_UNIQUE_NAME>
$> cd <DB_UNIQUE_NAME>
$> mkdir preupgrade
Tracked as Bug14614756 – fixed in Oracle 12.1.0.2
Oracle 10.2.0.5
RHEL4 – 32bit
115Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Run preupgrade_fixups.sql
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
Oracle 10.2.0.5
RHEL4 – 32bit
116Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Execute suggested actions manually:
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
Oracle 10.2.0.5
RHEL4 – 32bit
117Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Optional manual actions:
– Remove Enterprise Manager Database Control Repository
 Otherwise it will be dropped during catuppst.sql execution
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
$> emctl stop dbconsole
SQL> @?/rdbms/admin/emremove.sql
Oracle 10.2.0.5
RHEL4 – 32bit
118Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Optional manual actions:
– Essential step if OLS (Label Security) and/or DV (Database Vault) was already in the
database prior to the upgrade
 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
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
@?/rdbms/admin/olspreupgrade.sql
Oracle 10.2.0.5
RHEL4 – 32bit
119Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Optional manual actions:
– Remove Oracle UltraSearch before the upgrade
 UltraSearch does not exist in Oracle Database 11.2 and onwards, and it will be uninstalled during the upgrade
 Removing it before the upgrade might save 1-2 minutes upgrade downtime
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
SQL> @?/ultrasearch/admin/wk0deinst.sql SYS password ""
Oracle 10.2.0.5
RHEL4 – 32bit
120Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Prepare new init.ora:
1TB
Oracle 12.1.0.2
OL6 – 64bit
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 10.2.0.5
RHEL4 – 32bit
121Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Create a new password file (recommended):
1TB
Oracle 12.1.0.2
OL6 – 64bit
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
$> cd $ORACLE_HOME/dbs
$> orapwd file=orapwV102
password=<string> entries=15
format=12 force=yes
24 hrs
Oracle 10.2.0.5
RHEL4 – 32bit
122Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Set the environment:
1TB
Oracle 12.1.0.2
OL6 – 64bit
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
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
24 hrs
Oracle 10.2.0.5
RHEL4 – 32bit
123Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 10.2.0.5
RHEL4 – 32bit
 Listener configuration:
– If clients older than Oracle 11g connect then you must set:
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
in $ORACLE_HOME/network/admin/sqlnet.ora
1TB
Oracle 12.1.0.2
OL6 – 64bit
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
124Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Restore & recover an RMAN Online Backup
– Recreate TEMP tablespace
 Alternative:
Copy all relevant files to the new server
– Data files, redo logs, control files.
RMAN> run {
SET ARCHIVELOG DESTINATION TO
'/fra/tmprest';
RESTORE DATABASE;
RECOVER DATABASE; }
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
Oracle 12.1.0.2
OL6 – 64bit
24 hrs
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
125Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Changing OS from 32bit  64bit
– No action required as part of a (patch) upgrade!!!
– Special case: Keep the database version (not an upgrade!)
 OLAP must be reloaded with xumuts.plb – see MOS Note:352306.1
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
1TB
Oracle 10.2.0.5
OL5.6 – 64bit
1TB
startup upgrade
@?/rdbms/admin/utlirp.sql
shutdown immediate
startup upgrade
@?/rdbms/admin/utlrp.sql
Oracle 10.2.0.5
RHEL4 – 32bit
126Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 10.2.0.5
RHEL4 – 32bit
 Start the database in STARTUP UPGRADE mode:
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
24 hrs
1TB
127Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 What happens during STARTUP UPGRADE mode?
– Suppresses more
than 20 expected
error messages
such as ORA-942
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
24 hrs
1TB
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 …)
AQ Processes can not start in restrict mode
Completed: ALTER DATABASE OPEN MIGRATE
Oracle 10.2.0.5
RHEL4 – 32bit
128Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Upgrade duration to Oracle Database 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
– To less extent:
 CPU cores and speed
 IO throughput
Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle Workspace Manager 00:01:01
Oracle Enterprise Manager 00:10:13
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Oracle Multimedia 00:07:43
Oracle Expression Filter 00:00:18
Oracle Rule Manager 00:00:12
Gathering Statistics 00:04:53
Total Upgrade Time: 00:52:31
Component HH:MM:SS
Oracle Server 00:16:17
JServer JAVA Virtual Machine 00:05:19
Oracle XDK 00:00:48
Oracle Text 00:00:58
Oracle XML Database 00:04:09
Oracle Database Java Packages 00:00:33
Gathering Statistics 00:02:43
Total Upgrade Time: 00:30:47
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
129Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Speed up the upgrade
– Fresh dictionary stats
24 hours before upgrade
– Stats on XDB objects
if XDB is in use
– Process AUD$ info
 MOS Note: 1329590.1 offers a script to populate missing entries
 If auditing was/is on by accident:
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
exec
DBMS_STATS.GATHER_DICTIONARY_STATS;
exec
DBMS_STATS.GATHER_TABLE_STATS(ownnam
e=>'XDB', tabname=>'XDB$RESOURCE',
estimate_percent=>NULL);
truncate table SYS.AUD$ | SYSTEM.AUD$;
130Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Real World Case:
Create dictionary statistics
– 4th largest retailer worldwide
 1.5 million synonyms
 Oracle 9i  Oracle 11g
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
33% faster
0
50
100
150
200
250
300
350
400
Upgrade
Upgrade without/with Dictionary Statistics
Without Stats
With Dict Stats
Without Synonyms
131Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Real World Case:
Preprocess audit records
– Saudi Arabian banking customer's core system
 Approximately 75M auditing records in AUD$ table
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
0,0 2,0 4,0 6,0 8,0 10,0
Upgrade Duration
in hours 1,5
8,5
Without AUD$
preprocessing
With AUD$
preprocessing
132Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 10.2.0.5
RHEL4 – 32bit
 Run the upgrade with catctl.pl
– Default: n=4
– Maximum: n=8
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
1TB
133Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Default location for catctl.pl log files
– Current working directory
 Recommendation: Use –l parameter to specify an alternate location
– One log file for each parallel thread
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
24 hrs
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
134Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Restart the database in normal mode
– Create an spfile from the startup init.ora now
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
135Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Recompilation with utlrp.sql
– Call utlprp.sql directly
to customize CPU usage
 Most efficient value for n is
2x number of CPU cores
– Gathering fixed objects stats
may speed up recompilation
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
exec
DBMS_STATS.GATHER_FIXED_OBJECTS_STATS
;
SQL> @utlprp n
Oracle 10.2.0.5
RHEL4 – 32bit
24 hrs
136Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Monitoring of recompilation
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
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_%';
Oracle 10.2.0.5
RHEL4 – 32bit
137Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 New status in DBA_REGISTRY for the SERVER component in case of
any error before recompilation
– Check REGISTRY$ERROR for error details
– After recompiliation the status remains the same compared to previous releases
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
COMP_ID COMP_NAME VERSION STATUS
-------- ---------------------- ----------- ----------
CATALOG Oracle Database Catalo 12.1.0.1.0 INVALID
CATPROC Oracle Database Packa 12.1.0.1.0 INVALID
JAVAVM JServer JAVA Virtual M 12.1.0.1.0 VALID
CATJAVA Oracle Database Java P 12.1.0.1.0 VALID
...
Oracle 10.2.0.5
RHEL4 – 32bit
138Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Execute postupgrade_fixups.sql
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
139Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Upgrade status check: utlu121s.sql
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
140Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Invalid objects check
– utluiobj.sql
– Manual check
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE
from DBA_INVALID_OBJECTS order by 1,2;
Oracle 10.2.0.5
RHEL4 – 32bit
24 hrs
141Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Time zone adjustment – Why is this important?
– Real World Example from 2012:
 Why is the flight 1 hour shorter on Saturday? 
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
142Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 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
– Patch in MOS Note:412160.1
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
143Upgrade, Migrate & Consolidate to Oracle Database 12c
Oracle Database
Release
Default
Time Zone
Version
10.2.0.3 – 11.1.0.7 DST V4
11.2.0.1 DST V11
11.2.0.2 - 11.2.0.4 DST V14
12.1.0.1, 12.1.0.2 DST V18
Most recent time zone file: DST V25
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Time zone adjustment in Oracle 12c – script in: MOS Note:1509653.1
– For Oracle 11.2: MOS Note:977512.1
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
Database will
be restarted!
Oracle 10.2.0.5
RHEL4 – 32bit
144Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 RMAN Catalog Upgrade:
– SQL> @$ORACLE_HOME/rdbms/admin/dbmsrmansys.sql
– $ rman CATALOG my_catalog_owner@catdb
recovery catalog database Password:
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
 See: https://blogs.oracle.com/UPGRADE/entry/rman_catalog_upgrade_to_oracle
– RMAN Catalog database needs now to be an EE with Partitioning Option (since 12.1.0.2) - MOS Note:1927265.1
Install and patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post Upgrade
Actions
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
145Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
1TB
Oracle 12.1.0.2
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
24 hrs
146Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
147Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
148Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
149Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
150Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
151Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
152Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
153Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Alternative without HW migration
 DBUA:
154Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 1: Summary
 Database upgrade including migration to a new server
Install and
patch
Oracle 12c
Preupgrade
Checks
Prepare
Environment
Restore Entire
Database
Upgrade
Database
Post
Upgrade
Actions
1TB
Oracle 12.1.0.1
OL6 – 64bit
1TB
Oracle 10.2.0.5
RHEL4 – 32bit
24 hrs
155Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
A small team and an excellent plan
Upgrade 300 databases at Mobiliar Insurance, Switzerland
Upgrade, Migrate & Consolidate to Oracle 12c 156
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Swiss Mobiliar
– Switzerland's most personal insurer
– Founded 1826 in Bern, oldest Swiss insurance
– Legal form:
 Cooperative association (mutual company)
– Over 1.7 million persons and firms insured
– Switzerland's no.1 insurer for:
 Businesses, term life insurances, households
– 80 general agencies at 160 locations
– Over 4,400 employees and 325 trainees
– Awarded Most Trusted Insurance Brand in
Switzerland for 13 consecutive years
157
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Upgrade 289 databases
– Oracle Database 11.2.0.3 to Oracle Database 12.1.0.2
– 80 production databases
 Oracle Cloud Control
 AWR Warehouse (home-made)
 Shell scripts
 Oracle Restart with ASM
 Oracle In Memory
 OID
158
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Project timeline: 24 months
– Goal: 18 months
159
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
0
5
10
15
20
25
30
35
40
45
Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15
Migrations per month
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Small DBA Team
– Only 3.8 FTE + 1 newbie
 2 major software releases of Mobiliar Applications per year
resulting in a full month of code freeze
 Bug fixing support for Oracle 11.2.0.3 ended Aug 27, 2015
 Highly complex applications
– Queries with more than 1000 bind variables and 250 outer joins
 One core team member broke his leg in
September 2015 and did not return to work yet
160
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 All queries, execution time and execution paths are tracked on a self
made AWR Performance DWH
 Possibility to compare performance before and after the upgrade on
query level
 Performance tests performed by application owner
 Regression tests done during the testing phase of the Mobi Software
Release
– PSU RDBMS 12.1.0.2.4, PSU GRID 12.1.0.2.2
– Two Oracle Homes on the same server
– Upgrade with catctl.pl embedded into home-built shell script
161
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Project Monitoring with Excel Sheet
162
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
0
50
100
150
200
250
300
350
Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15
Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15
DBs 12c 0 7 10 18 26 62 105 126 136 152 157 170
DBs 11g 289 282 279 271 263 227 184 163 153 137 132 119
Oracle Database Swiss Mobiliar
DBs 11g DBs 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Automated upgrade via home-built scripts:
163
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Live? And alive?
– Yes! First system went live on Feb 4, 2015
– Current status (Oct 12, 2015):
 152 out of 289 databases live on Oracle Database 12.1.0.2
 53% upgraded already
 Project perfectly on schedule
164
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
137
152
No. Databases
Oracle. 11.2.0.3 Oracle 12.1.0.2
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 No major issues after go live
– Issues caught during testing, e.g.:
– Bug 20776435: PARSE OF INMEMORY QUERY IS SPINNING ON CPU
 Query with 250 Left Joins
 Workaround:
alter session set "_optimizer_inmemory_table_expansion"=false;
– Bug 19677469: NO QUERY REWRITE
 Workaround:
CREATE MATERIALIZED VIEW …. SELECT /*+ MV_MERGE */ …
or:
alter system set "_fix_control"='10145667:OFF';
165
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Oracle In-Memory boosts performance
– Read on: http://tinyurl.com/Mobi12c
166
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
"The entire upgrade project of our 300 Oracle databases at
Die Mobiliar is running very well.
When we catch issues, we fix them before going live.
And features such as Oracle In-Memory add a lot of
performance boost to some of our applications.
Especially the Oracle Upgrade Reference Program was a
great help and added a lot of value to our project's progress.
We are very happy and satisfied with the upgrade process
and the reliability and performance of Oracle Database 12c".
Paolo Kreth, Group Manager Databases, Die Mobiliar
167
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
168Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
2
RAC & ASM
Upgrade
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 2: Upgrade RAC and move to ASM
 RAC Database migration to a new cluster including upgrade
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB 5TB
Oracle 12.1.0.2
OL6
169Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 2: Upgrade RAC and move to ASM
 RAC Database migration to a new cluster including upgrade
Install
GI and DB 12.1.0.2
Preupgrade
Checks
Prepare
Environment
and ASM
Restore Online
Backup for
Standby
Activate and
Upgrade
Post
Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB 5TB
Oracle 12.1.0.2
OL6
Oracle 11.2.0.2
PHYSICAL STANDBY
170Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Use a Physical Standby for Hardware Migration
 Fast and simple: Test it several times!
 Does not require source release software on target hardware
 Mixed Oracle Version support with Data Guard Redo Transport Services (Doc ID 785347.1)
 Could include migration to RAC and/or ASM
 Migrating to RAC using Data Guard (Doc ID 273015.1)
 Works cross platform (same Endianness) in some cases
 Data Guard Support for Heterogeneous Primary and Physical Standbys…(Doc ID 413484.1)
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB 5TB
Oracle 12.1.0.2
OL6
Oracle 11.2.0.2
PHYSICAL STANDBY
171Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 2: Upgrade RAC and move to ASM
 RMAN mixed platform support
– Duplicate, restore and recovery
 MOS Note:1079563.1  Only supported for:
– DUPLICATE FROM ACTIVE DATABASE
– Backup-based DUPLICATE using image copies or backup sets
– RESTORE and RECOVER using image copies or backup sets
 Bit change requires utlirp.sql to invalidate PL/SQL and code
–
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB 5TB
Oracle 12.1.0.2
OL6
172Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Grid Infrastructure installation
– Always install/upgrade Oracle Clusterware first!
 Install it into a new Grid Infrastructure home
 GI version ≥ resources (ASM, RDBMS …)
– Rule is valid until 4th digit – PSUs can differ and can be higher in e.g. DB Home
Install
GI and DB 12.1.0.1
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB
GI 12.1.0.2
OL6
173Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Oracle Home/Base
– Grid Infrastructure
should be in a different
location than the
database's ORACLE_BASE
– Part of the GI home
is owned by root once
root.sh/rootupgrade.sh
has been run
– Windows: Remote Registry Service must be enabled – see: https://technet.microsoft.com/en-us/library/cc754820.aspx
Grid Infrastructure Installation
GI
DB
174Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grid Upgrade Planning, Prep and Prereqs
 ORAchk (formerly RACchk)
 MOS Note:1268927.1
 Cluvfy
 MOS Note:316817.1
 EXAchk
 MOS Note:1070954.1
 RAC Best Practice / Starter Kit
Start here:
 Generic: MOS Note: 810394.1
Then study the one for your platform(s):
 Linux: MOS Note: 811306.1
 Windows: MOS Note: 811271.1
 AIX: MOS Note: 811293.1
 HP-UX: MOS Note: 811303.1
 SPARC Solaris: MOS Note: 811280.1
 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!
175Upgrade, Migrate & Consolidate to Oracle Database 12c
 Just in case: MOS Note: 759868.1- How to Convert RAC ASM/DB instances to non-RAC ASM/DB instances
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
RAC Upgrade ORAchk Upgrade Readiness Assesment
 Upgrade Readiness Assessment with ORAchk: MOS Note:1457357.1
 Download the newest version of ORAchk: MOS Note:1268927.1
Upgrade, Migrate & Consolidate to Oracle Database 12c 176
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
RAC Upgrade ORAchk Upgrade Readiness Assesment
 Upgrade Readiness feature of ORAchk
– Pre Upgrade
 $> orachk -u -o pre
– Post Upgrade
 $> orachk -u -o post
Upgrade, Migrate & Consolidate to Oracle Database 12c 177
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
GI Home: Planning, Prep and Prereqs
 11.2/12.1 GI 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)
178Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Since 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
SCAN: Planning, Prep and Prereqs
179Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 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
SCAN: Planning, Prep and Prereqs
180Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Top Level Flow:
– Verify the hardware/software environment
– Install the software
– Configure the software
– Finalize the upgrade
Completing the Upgrade
181Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 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/12.1 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
Completing the Upgrade
182Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 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
Completing the Upgrade
183Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Addtional 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.
Completing the Upgrade
184Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Grid Infrastructure 12.1.0.1 Upgrade
 How to Upgrade to Oracle Grid Infrastructure 12c Release 1
– Oracle Grid Infrastructure Installation Guide
 12c Grid Infrastructure Quick Reference:
– MOS Note:1517182.1
 Pre 12.1 Database Issues in 12c Grid Infrastructure Environment
– MOS Note: 1568834.1
 How to Upgrade to 12c Grid Infrastructure if OCR or Voting File is on
Raw/Block Device
– MOS Note:1572925.1
185Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grid Infrastructure Installation/Upgrade
186Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grid Infrastructure Installation/Upgrade
This choice has been made obsolete in Oracle 12.1.0.2 as GIMR is mandatory
187Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
GIMR? MGMTDB?
 Grid Infrastructure Management Repository
– What is stored inside?
 http://docs.oracle.com/database/121/CWADD/troubleshoot.htm#CWADD92242
– SID? –MGMTDB DBNAME? _MGMTDB
– It is a single-tenant database (CDB with one PDB) since Oracle 12.1.0.2
– Previous installations of the GIMR will be deleted
 The information can be preserved if necessary
– OUI will choose automatically the first OCR disk group
– GIMR will take roughly 750MB per day per node - default retention is 3 days
– More details:
 How to Handle the Oracle GIMR
 https://blogs.oracle.com/UPGRADE/entry/grid_infrastructure_management_repository_gimr
Upgrade, Migrate & Consolidate to Oracle Database 12c 188
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grid Infrastructure Installation/Upgrade
189Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Grid Infrastructure Installation/Upgrade
190Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Clusterware - ASM - DB Compatibility
 See MOS Note:337737.1
Clusterware ASM DB Certified
12.1 12.1 12.1 Y
12.1 12.1 11.2(a) Y
12.1 12.1 11.1(a) Y
12.1 12.1 10.2(a) Y
11.2 11.2(b) 11.2 Y
11.2 11.2(b) 11.1 Y
11.2 11.2(b) 10.2 Y
Clusterware ASM DB Certified
11.1 11.1 11.1(c) Y
11.1 11.1 10.2 Y
11.1 11.1 10.1 Y
11.1 10.2 11.1 Y
11.1 10.2 10.2 Y
11.1 10.2 10.1 Y
11.1 10.1(d) 11.1 Y
11.1 10.1(d) 10.2 Y
11.1 10.1 10.1 Y
10.2 10.2 10.2 Y
10.2 10.2 10.1 Y
10.2 10.1(d) 10.2 Y
10.2 10.1 10.1 Y
10.1 10.1 10.1 Y
191Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Clusterware & ASM Upgrade
 Documentation:
– Oracle Clusterware Administration and Deployment Guide 12c
http://docs.oracle.com/cd/E16655_01/rac.121/e17886/toc.htm
 Grid Infrastructure Upgrade Known Issues:
– Note: 948456.1: Pre 11.2 Database Issues in 11gR2 Grid Infrastructure
 Oracle Clusterware rolling upgrade:
– 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
 Rolling ASM Upgrades:
– http://docs.oracle.com/cd/E16655_01/install.121/e17888/procstop.htm#CWLIN524
192Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Grid Infrastructure Patch Sets – 11g only!!!
 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
193Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle EXADATA 11.2.0.3/4 Patching – plus 10.2.0.x
 For certification, recommendations, issues, current patches etc. see
– MOS Note:888828.1
Database Machine and Exadata Storage Server 11.2 Supported Versions
– MOS Note 1306814.1: Oracle Software Patching with OPLAN
 Patch Upgrade from 11.2.0.1/11.2.0.2 to 11.2.0.3:
– MOS Note:1373255.1
Database Upgrade on Exadata Database Machine to 11.2.0.3
 MULTICAST is already setup correctly on a Database Machine V2
 Patch Upgrade to 11.2.0.4:
– MOS Note:1565291.1:
11.2.0.4 Grid Infrastructure and Database Upgrade for 11.2.0.2 BP12 and later
– MOS Note:1555036.1:
11.2.0.4 Grid Infrastructure and Database Upgrade for 11.2.0.2 BP11 and earlier
 Exadata and Oracle 10.2:
– MOS Note:1965897.1 - Oracle Database 10g Release 2 Support on Exadata
194Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle EXADATA 12.1.0.2 Upgrade
 MOS Note:1306791.2
Information Center: Oracle Exadata Database Machine
 MOS Note:1364356.2
Information Center: Upgrading Oracle Exadata Database Machine
 MOS Note:1681467.1
GI and Database Upgrade from 11.2.0.2-4, 12.1.0.1 to 12.1.0.2 on Exadata
 MOS Note:1537407.1
Requirements and restrictions when using Oracle 12c on Exadata
 MOS Note:1571789.1: Exadata Storage Software 12.1
– Smart Scan support on Exadata with Oracle Database 12c
– IO Resource Manager works with 12c – also with Multitenant
– Cell-to-cell data transfer for faster ASM resync, resilver, rebalance
195Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 11.2.0.1
OEL5.8
5TB
 Database software installation:
– Oracle Database 12.1.0.2
 For recovery only there's no need to install Oracle Database 11.2.0.2
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
4 hrs
Oracle 12.1.0.2
OL6
196Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Download/execute newest preupgrade scripts: MOS Note:884522.1
– preupgrd.sql and utluppkg.sql
– Files can be found in Oracle 12c's ?/rdbms/admin as well
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
5TB
Oracle 12.1.0.2
OL6
197Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle 11.2.0.2
OEL5.8
 Prepare Storage for ASM: MOS Note 452924.1
– Raw disk
– Logical unit numbers (LUNs)
– Raw logical volumes (LVM) – not recommended
– NFS and dNFS Volumes are supported - see and MOS: 1570073.1 and documentation:
https://docs.oracle.com/cd/E11882_01/install.112/e47689/app_nas.htm#LADBI1372
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
4 hrs
5TB
Oracle 12.1.0.2
OL6
198Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Configuring ASM with ASMCA
199Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Restore backup into ASM – see MOS Note:1617946.1
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB
Oracle 12.1.0.2
OL6
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
Source  11.2.0.2 Destination  12.1.0.2 (ASM)
Make sure archive logging is on
Switch on Force Logging Create identical trace file structure
Create a password file with identical PW
Adjust init.ora Adjust init.ora
Adjust tnsnames.ora Adjust listener.ora and tnsnames.ora
DUPLICATE FOR STANDBY FROM
ACTIVE DATABASE
Adjust controlfile names
Switch on log transport Switch on managed recovery mode
5TB
Oracle 11.2.0.2
PHYSICAL STANDBY
200Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Restore Backup into ASM – Before Oracle 11g
 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;
 Rename controlfiles and switch on log transport and recovery
201Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Stop on production
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
4 hrs
5TB
Oracle 12.1.0.2
OL6
5TB
Oracle 11.2.0.2
PHYSICAL STANDBY
$ $ORACLE_HOME/perl/bin/perl catctl.pl 
-n 8 catupgrd.sql
SQL> @?/rdbms/admin/utlrp.sql
 Final synchronization
 Activate standby, and Upgrade it!
202Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
203Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Register resources to Clusterware
 Advance ASM compatibility
 Set CLUSTER_DATABASE to TRUE
 Start the instances on all nodes
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
5TB
Oracle 12.1.0.2
OL6
5TB
204Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 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>
 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 (just if source was below 11g)
– $> ocrconfig -add +data
– $> ocrconfig -delete /dev/raw/raw1
– $> crsctl replace votedisk +VOTING
 Set CLUSTER_DATABASE to TRUE and start the instances on all nodes
Install
GI and DB 12.1.0.2
Preupgrade Checks
Prepare Environment
and ASM
Restore Online
Backup for Standby
Activate and
Upgrade
Post Upgrade
Actions
205Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Important Notes and White Papers
 TWP: Migration to Oracle ASM
http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-
asmmigrationwithdg-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?
206Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 2: Summary
 RAC Database migration to a new cluster including upgrade
Install
GI and DB 12.1.0.2
Preupgrade
Checks
Prepare
Environment
and ASM
Restore Online
Backup for
Standby
Activate and
Upgrade
Post
Upgrade
Actions
Oracle 11.2.0.2
OEL5.8
5TB
Oracle 12.1.0.2
OL6
5TB
Oracle 11.2.0.2
PHYSICAL STANDBY
4 hrs
207Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Interhyp AG
– Financial institution
– HQ in Munich/Germany
– Bank for residential and
development financing
– Banking service provider to other German key banks
– 100% subsidiary of Dutch ING Bank
208
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Scope:
– Upgrade 6x 2-node-RAC systems
– Oracle 10.1.0.5  Oracle 11.2.0.2 with ASM
 RH Linux 32bit  RH Linux 64bit
 Hardware exchange for key systems:
2-node cluster  4-node cluster
209
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Constraints:
– Downtime window: 4 hrs per database
 Upgrade/migrations one after another
– Network bandwidth not sufficient for Data Pump
– LOBs in the source database
210
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Prepare new cluster
– Install Oracle Grid Infrastructure 11.2 and patch it
 Decrease upgrade duration to ~30 minutes
– Remove unused components from production db
211
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Phyical standby as migration vehicle
– Avoid copy downtime
 Oracle 10.1.0.5  Oracle 10.1.0.5 within 11.2 ASM
Note: This wasn’t officially certified, but will work in this case
– Activate standby and upgrade it
 Can be tested many times!!
212
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Upgrade
– Activate standby and put into STARTUP UPGRADE
 Invalidate and compile all packages/code (32bit  64bit!)
– Post upgrade:
 Register database to Clusterware
 Move OCR/Voting into ASM
213
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Live? And alive?
– Yes!!! Go Live: 27-NOV-2010
– Total downtime: ~2 hours
– Database upgrade time:
 24 minutes + 5 minutes recompilation
– Very robust using the entire Oracle software stack
214
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Well ... the optimizer ...
– We found some optimizer issues
 Reports were affected
 Remedy: Hints, rewrite and patches andSQL Profiles
 Don't argue with Support when you have Exadata BP on a
regular Linux RAC
– MOS Note:1459365.1:
Exadata Bundle Patches and Non-Exadata Systems
215
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
216Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Data Pump
Migration
3
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 3: Cross Endianness Migration with Data Pump
 Migration of a single instance database to Exadata
Oracle 9.2.0.8
HP-UX
Oracle 12.1.0.2
OL5.8 64bit
8TB8TB
24 hrs
217Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 3: Cross Endianness Migration
 Basic 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
Oracle 9.2.0.8
HP-UX
Oracle 12.1.0.2
OL5.8 64bit
8TB8TB
24 hrs
218Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 3: Cross Endianness Migration
 Better options since Oracle 10g:
– Data Pump expdp and impdp
 Usually the first option to try
– Cross platform Transportable Tablespaces (xTTS)
 More complicated, more manual steps than pure Data Pump
Oracle 9.2.0.8
HP-UX
Oracle 11.2.0.4
OL5.8 64bit
8TB8TB
Oracle 11.2.0.4
HP-UX
8TB
SWING
24 hrs
219Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
Oracle 9.2.0.8
HP-UX
Oracle 12.1.0.2
OL5.8 64bit
8TB8TB
Oracle 11.2.0.4
HP-UX
8TB
SWING
24 hrs
220Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
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
221Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Overview
 Limitations
– Not compatible with "old" exp/imp
 Since Oracle 11.2: "Old" par files can be used legacy interface
– 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:SECUREFILE
222Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Best Practices
 For full exports:
– Role EXP_FULL_DATABASE is required
 For export consistency use:
– FLASHBACK_SCN=<scn>
– FLASHBACK_TIME=SYSTIMESTAMP
alternative:
– CONSISTENT=Y [since Oracle 11.2 – Legacy Interface]
 This will increase UNDO requirements for the duration of the export
 Always set parameters:
– EXCLUDE=STATISTICS
– METRICS=YES
223Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Best Practices
Performance Tips
 Use PARALLEL=n
– Typically n = 2x <number of CPU cores>
 EXCLUDE=STATISTICS on export
 Enable parallel import of indexes: apply patch for bug 21539301
– Available for 11.2.0.4 and 12.1.0.2
 New feature in 12c: TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
– Apply patch for bug 20778442
Upgrade, Migrate & Consolidate to Oracle Database 12c 224
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Best Practices
Network Mode
 Direct import via database link
– Parameter: NETWORK_LINK
 Run only impdp on the target system - no expdp necessary
 No dump file written, no disk I/O, no file transfer needed
 Restrictions of database links apply:
– Does not work with LONG/LONG RAW and certain object types
 Performance: Depends on network bandwidth and target's CPUs
Upgrade, Migrate & Consolidate to Oracle Database 12c 225
$ expdp ...
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Best Practices
Network Mode
 Real World Case:
Kaiser Permanente, Medicare (USA)
– impdp on NETWORK_LINK with
8 vs 16 CPU cores
 10GBit connection leveraged up to 8 Gbit
 1 TB table copied in ~15 min  4 TB/hour
– Network bandwidth and CPU bound
Upgrade, Migrate & Consolidate to Oracle Database 12c 226
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Filtering
 Filtering is very powerful
– If using EXCLUDE parameter, everything else is included
– If using INCLUDE parameter, everything else is excluded
– Can’t use EXCLUDE and INCLUDE in the same Data Pump job
– Specify complete path or partial path
 Objects matching the specified path will be excluded/included
 Query to find exclude/include object types:
– select unique seq_num, full_path
from sys.datapump_paths
where het_type = 'DATABASE_EXPORT'
order by seq_num;
– job_type: het_type:
FULL DATABASE_EXPORT
SCHEMA SCHEMA_EXPORT
TABLE TABLE_EXPORT
TRANSPORTABLE TRANSPORTABLE_EXPORT
227Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Filtering
 EXCLUDE example
expdp system/manager schema=hr exclude=statistics …
vs
expdp system/manager schema=hr
exclude=SCHEMA_EXPORT/TABLE/STATISTICS
select unique SEQ_NUM, FULL_PATH
from SYS.DATAPUMP_PATHS
where HET_TYPE = 'SCHEMA_EXPORT' AND
FULL_PATH like '%STATISTICS%' order by SEQ_NUM;
77 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS
78 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
221 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS
222 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP
223 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
225 SCHEMA_EXPORT/TABLE/STATISTICS
226 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
227 SCHEMA_EXPORT/TABLE/STATISTICS/USER_PREF_STATISTICS
228Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump Filtering
 INCLUDE example:
– Same results but includes everything with "table" in the path:
– Includes the table definition only:
– Some of the TABLE object paths
impdp system/manager tables=hr.employees
impdp system/manager schemas=hr
include=table/table:"= 'EMPLOYEES'“
SCHEMA_EXPORT/TABLE/TABLE
SCHEMA_EXPORT/TABLE/TABLE_DATA
SCHEMA_EXPORT/TABLE/GRANT
impdp system/manager schemas=hr
include=table:"= 'EMPLOYEES'"
229Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump News in Oracle 12c
 Full transportable export/import for an entire database
 Support for multitenant container databases and pluggable databases
 New …
– VIEWS_AS_TABLES parameter
 Lets you export the contents of a view as a table
– TRANSFORM parameter options
 TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
– Will disable archive logging during import for tables and/or indexes
 TRANSFORM=LOB_STORAGE:SECUREFILE
 TRANSFORM=STORAGE:N
 TRANSFORM=TABLE_COMPRESSION:<compression_clause>
– LOGTIME=[ NONE | STATUS | LOGFILE | ALL ] parameter
 Will write timestamps on status and/or logfile messages
230Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump News in Oracle 12c
 TRANSFORM option to enable Advanced/HCC Compression
– Example:
 TRANSFORM=TABLE_COMPRESSION:"compress for query high"
– But: Granularity only on the entire import
 Workarounds:
– Precreate objects
 Downside: Will slow down import!!!
or:
– Precreate the tablespace with COMPRESS option
 create tablespace ARCHIGH datafile 'archigh.ora' size 100G default compress for
archive high;
– Then run Data Pump with TRANSFORM=TABLE_COMPRESSION:N
 This will drop all embedded compression attributes associated with the tables
 Now tablespace compression option will be used for all newly created tables
231Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Exporting Views as Tables
TABLE1
VIEW1 expdp system/mgr
views_as_tables=scott.view1 ...
impdp system/mgr
remap_table=view1:scott.table1 ...
TABLE1
Upgrade, Migrate & Consolidate to Oracle Database 12c 232
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
LOGTIME Parameter
 Without vs With LOGTIME=ALL
Upgrade, Migrate & Consolidate to Oracle Database 12c 233
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enhanced Compression Algorithm
 COMPRESSION_ALGORITHM
– Defines the compression algorithm when compressing dump files
 BASIC The same algorithm used in previous versions. Good compression, without severely impacting on performance
 LOW : For use when reduced CPU utilization is a priority over compression ratio
 MEDIUM: Recommended option. Similar characteristics to BASIC, but uses a different algorithm
 HIGH: Maximum available compression, but more CPU intensive
– Performance:
 Compression ratio
 CPU usage
– Requires Advanced Compression Option license
$ expdp scott/tiger tables=emp directory=mydir
dumpfile=emp.dmp logfile=expdp_emp.log
compression=all compression_algorithm=medium
234Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enhanced Compression Algorithm
 Customer evaluation
– BASIC
at 3.5 TB/hour
– MEDIUM
at 7.0 TB/hour
2x
235Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Payback GmbH
– Belongs to Loyalty Partner GmbH
which belongs to American Express
– HQ in Munich, Germany
– Develops and operates professional customer loyalty programs based
on customized IT solutions
 Provider for Payback
 Active in Germany, Poland,
India, Italy, Mexico and USA
236
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Migrate 7TB / 1.5TB from HP-UX to Exadata V1
– Cross platform, cross Endianness, cross version
 Oracle 9.2.0.7 on HP-UX  Oracle 11.1.0.7 on OL
– 4 months planning and migration phase
 August to November 2009
– Proposed go-live date
 15-NOV-2009
237
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Move everything in less than 24 hrs
 Network bottleneck
– Remedy:
Install extra InfiniBand hardware into HP box
 ~ 3GB/sec throughput!
238
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Setup:
239
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Restore
+
Upgrade
HP-UX PA-RISC HP-UX PA-RISC OL 64bit
PROD SWING
Prod Load
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Test migrations:
240
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
HP-UX PA-RISC HP-UX PA-RISC OL 64bit
PROD SWING
Prod Load
Data Pump on
NETWORK_LINK
INSERT APPEND
on database links
for tables >100 GB
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Parallel live loads: Performance tests
241
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Redirect the production load by apps servers
HP-UX PA-RISC HP-UX PA-RISC OL 64bit
PROD SWING
Prod Load Prod Load
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Final test became LIVE migration
242
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
HP-UX PA-RISC OL 64bit
PROD
HP-UX PA-RISC
SWING
Prod Load
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Live? And alive?
– Yes! Go-live in early November 2009
 Two weeks earlier than proposed
– Total upgrade and migration time: ~20 hours
 ~ 8 hours: Restore and recovery
 ~ 1 hour: Database upgrade to Oracle 11.1.0.7
 ~10 hours: Data migration to Exadata V1
 ~ 1 hour: Smoke testing and final verification
– Dramatic performance improvements
 Job runtimes decreased by 80%
 User complaints about too fast performance … really!!
243
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Not a single piece of SQL got changed!!!
– Most critical job: runtime from 30 hrs to < 2hrs
244
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Same customer again … Payback GmbH
245
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Migrate 14TB from Exadata V1 to Exadata X2-2
– 2 months planning and migration phase
 June to July 2012
– Proposed go-live date
 22-JUL-2012
– MOS Note: 1055938.1
Migrating from HP Oracle Database Machine to
Sun Oracle Database Machine 11.2 using Data Guard
246
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Database has grown from 7TB to 14TB
 Downtime: less than 8 hrs
 Network "bottleneck"
– Remedy: Extra IB cabled connection from V1 to X2-2
247
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Restoring 14TB with RMAN
– DUPLICATE FOR STANDBY FROM ACTIVE DATABASE
 Removed unused components from the source database
248
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
RMAN Restore
64 parallel channels
InfiniBand cable
Oracle
11.1.0.7
Oracle
11.1.0.7
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Live upgrade/migration
– RMAN Restore and Recovery: <3 hours
 64 parallel RMAN channels allocated: >4TB/hour
249
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
RMAN Restore
64 parallel channels
Oracle
11.1.0.7
Oracle
11.1.0.7
InfiniBand cable
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Database upgrade 11.1.0.7  11.2.0.3
– Using the new PARALLEL UPGRADE* scripts
 Total database upgrade time including recompilation and time zone change: 20
mins
250
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Oracle
11.1.0.7
Oracle
11.1.0.7
Oracle
11.2.0.3
* * Released for selected customers ollyInfiniBand cable
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Live? And alive?
– Yes! Go-live on 3-JUL-2012
 Almost three weeks earlier than proposed
– Total migration and upgrade time: ~4 hours
 < 3 hours: Restore for Standby and recovery
 < 20 mins: Database upgrade to Oracle 11.2.0.3
 ~ 40 mins: Extra tasks (crsctl etc.)
– Significant performance improvements
 Job runtimes decreased again by 30-60%
251
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 A few plans did change – but we were prepared 
– Had captured all plans from AWR into an SQL Tuning Set
– Remedied failing plans with SQL Plan Management
252
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
253Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Transportable
Tablespaces
4
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Concept Transportable Tablespaces
75TB 75TB
Self Contained?
Read Only
expdp "'"sys/sys as sysdba"'" …
TRANSPORT_TABLESPACES=TS1,TS2 …
impdp "'"sys/sys as sysdba"'"…
TRANSPORT_DATAFILES=…
Read Write
 TTS feature available since Oracle 8i
 Cross platform support since Oracle 10g
254Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transportable Tablespaces Pros and Cons
 Pro
– Potentially very fast
 Copying large files can be faster than
exporting & importing everything
 No need to rebuild indexes
– Cross platform since Oracle 10g
– Decrease copy/convert time by using
RMAN Incremental Backups
– Proven solutions for EBS and other
apps available
 Con
– SYSTEM/SYSAUX can't be transported
– Complexity is your enemy
 Too many objects to rebuild
– Views, synonyms, sequences …
– Simple is better for fast TTS!!!
 Too many objects in tablespaces
slow down meta expdp/impdp
– (Sub)partitions, partitioned indexes …
Upgrade, Migrate & Consolidate to Oracle Database 12c 255
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Workflow
Upgrade, Migrate & Consolidate to Oracle Database 12c 256
Set all data
table-
spaces
Read-Only
Export
meta
tablespace
contents
Generate
CREATE
scripts
Restore and
convert
datafile
backups
Precreate
users in
target
database
Import meta
tablespace
contents +
Plug in
Datafiles
Execute
CREATE
scripts
Set all data
table-
spaces
Read-Write
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Concept Transportable Tablespaces xTTS
LITTLE ENDIAN PLATFORMS
HP IA Open VMS
HP Open VMS
HP Tru64 UNIX
Linux IA (32-bit)
Linux IA (64-bit)
Linux x86 64-bit
Microsoft Windows IA (64-bit)
Microsoft Windows x86 64-bit
Microsoft Windows IA (32-bit)
Solaris Operating System (x86)
Solaris Operating System (x86-64)
BIG ENDIAN PLATFORMS
HP-UX (64-bit)
HP-UX IA (64-bit)
AIX-Based Systems (64-bit)
IBM zSeries Based Linux
IBM Power Based Linux
Solaris[tm] OE (32-bit)
Solaris[tm] OE (64-bit)
 Cross platform support
– V$TRANSPORTABLE_PLATFORM
FILE
COPY
RMAN
CONVERT
FILE
COPY
257Upgrade, Migrate & Consolidate to Oracle Database 12c
DBMS_FILE_
TRANSFER
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Concept Transportable Tablespaces xTTS
 TTS cross platform
– RMAN creates a file copy
– Can be done on source or target system
 Use the faster storage
– Takes approximately the same amount of time as a backup and requires staging space
– Multiple channels can be used
– Example:
– DBMS_FILE_TRANSFER converts implicitly and does not require staging but is generally
slower
RMAN> CONVERT TABLESPACE users,example
TO PLATFORM 'Linux IA (32-bit)'
FORMAT='/stage/transport_linux/%U';
258Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade/Migration: Transportable Tablespaces
DESTINATION Database 12.1.0.2
SYSTEM
SYSAUX
UNDO
TEMP
SCOTT
HUGO
VIEWS
CODE
PRIVS
SOURCE Database 11.2.0.4
SYSTEM
SYSAUX
UNDO
TEMP
SCOTT
HUGO
VIEWS
CODE
PRIVS
Read Only
Rebuild meta information
(views, synonyms, trigger, roles etc)
Upgrade, Migrate & Consolidate to Oracle Database 12c 259
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Possible options
 Moving meta information
– The “brute force” approach
 Data Pump
– The “smart” approach
 DBMS_METADATA
expdp/impdp CONTENT=METADATA_ONLY
SELECT DBMS_METADATA.GET_DDL('SYNONYM', SYNONYM_NAME,
OWNER) FROM all_synonyms where owner='PUBLIC' and
table_owner not in ('SYS');
260Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transportable Tablespaces
 Avoid physical file copies when possible
– Use a physical standby
as your transporter
– Mount from two sides
 Tablespaces can be mounted
from two databases at the
same time as long as they
are set read-only
 Take special care on:
– Time zone versions must be equal prior to transport
 Otherwise Data Pump will block the meta import
– Be careful with starting values for sequences
STANDBY
TTS
PHYS
TTS
PHYS
STANDBY
261Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Fuji Xerox Singapore
– Headquartered in Tokyo, locations throughout the Asia-Pacific region
– Global leader in document services and communications
– Over ¥1 trillion annual revenue
– 45,000+ employees
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 262
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Upgrade and migrate Oracle E-Business Suite database
and applications
– Multi-language environment
3TB
RAC1
RAC2
RAC3
RAC4 3TB
11i
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 263
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Database hosts information from multiple countries in a
single EBS instance
– Includes nine different alphabets
 OS and Endian Conversion
 Coordination of EBS and DB upgrades and patching
 Single 1Gbit network card on source system
 No testing impact on PROD allowed
 Initial migration testing showed 7+ days of downtime
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 264
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Database Migration Options
exp/imp: too slow
Data Pump, xTTS: requires 10g or newer
Decision: upgrade DB, then use xTTS
 Test plan
– Multiple test runs to understand and tune the process
– Copy of production environment to avoid any impact on business
operations during testing
 Worked with third-party SI, Oracle ACS and Oracle
Development early in the process
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 265
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Detailed migration planningCustomer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 266
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Addressed network speed issues
– Reduced file copy time from 9 hours to 4 hours
 Added network cards to source system (total 4 x 1Gbit)
 Parallel scripts to copy data files from source to target
 Identified and applied helpful patches on source and
target systems
 Tuned parameters and parallelism for EBS upgrade
 Analyzed and tuned post-upgrade performance on target
system
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 267
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
1. Install target environment
2. Upgrade source DB to 11g on Solaris
3. Migrate across platform using xTTS
4. Upgrade EBS to R12 on Exadata
Cross-platform Transportable
Tablespaces
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 268
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 YES: went live in Spring 2013
 Some EBS actions required or desirable prior to the DB
upgrade
– E.g. Patch to improve performance on the DR$PENDING table
 Just a few post-upgrade DB tuning steps needed
– Re-registered services to fix load imbalance in RAC
– Found and fixed a few recommended parameter settings that had been missed
 And some EBS tuning as well
– Increased number of JVM to accommodate more users
– Modified Forms OC4J Container values to improve navigation
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 269
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Database upgrade is often only part of the project
 The more current your source version, the less work is
involved in an upgrade or migration
 Tune your application, not just your database!
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 270
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 One of the top 5 banks in the world
– Based in North America
– Businesses include consumer banking,
credit cards, asset management, business
finance, investment banking…
– Over $2 trillion in assets, more than
$100 Billion in annual revenue
– 240,000 employees in 60 countries
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 271
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 70+ TB to migrate and upgrade
Current Configuration New Configuration
CPUs 16 single-core 4 x 8-core
Operating System
Endian
Big Little
File System Veritas CFS, SFRAC 4.1 Veritas CFS, SFRAC 5.1
Disk Group 1 per DB 3-4 per DB
Database size 70+ TB 70+TB
Database Version Oracle 10.2.0.4 Oracle 11.2.0.2
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 272
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Endian conversion
– Both OS- and database-level endian conversions needed
 Data synchronization
– Up to the minute before conversion
 Conversion Window
– Migration and basic testing: 48 hours
 Size & Scale of data
– 70+ TB, millions of sub-partitions, extremely active OLTP system
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 273
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Explore Data Movement Options
 Copying 70TB over the 10Gb network = ~20 hours
 And it doesn’t include DB cross-endian conversion!
– Customer decision:
 Use already licensed Veritas Portable Data Containers
 Turbo TTS was not available yet
– No need to license 3rd party software anymore!
 Explore Database Conversion Options
– Many options evaluated
– Customer decision:
 Cross-Platform Transportable Tablespaces
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 274
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Migration Weekend: Met plan almost exactly!
Duration Action
3 hours Graceful application shutdown, backup
6 hours Instantiate and validate DB on swing server
6 hours Data Pump metadata export
1 hours OS-level endian conversion
20 hours RMAN CONVERT processing
8 hours Data Pump metadata import
5 hours Post-migration tasks (TNSNAMES, re-create dblinks, etc.)
2 hours Post-migration validation & smoke testing
35 hours Migrate 70+ TB cross-endian!!!
51 hours Total time
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 275
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 YES ...just a couple of post-upgrade tweaks:
– Wrong job_queue_processes setting blocked parallel
recompilation
 Remedy: Set it to a value greater than 0 starting in 11.2
– High MUTEX contention after upgrade
 Remedy: Apply newest PSU – it had all the fixes!!!
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 276
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Expect the unexpected -- especially things you don‘t
control! In this case...
– Windows security group decided to roll out new security profiles
on migration weekend
– Upgrade weekend delayed by US debt ceiling negotiations
– …what will happen during your big migration?
 Does it really need to be said? Test!!!
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 277
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Speed Up Transportable Tablespaces
 Usually the biggest pain points with TTS
– Downtime due to:
 Duration to copy very large amounts of data
 Duration to convert many tablespaces cross Endianness
 New technique: Avoid the copy & convert phase
– RMAN can convert incremental backups cross platform
 Available since Oracle 11.2.0.3 for Exadata only
 Available for Linux x86-64 with Oracle 11.2.0.4
 Available on all platforms starting with Oracle 12c
 See MOS Note:1389592.1 for description and Linux PERL scripts
278Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
The biggest pain points of TTS?
• Copy and convert a large database
• Rebuild all the meta information
Upgrade, Migrate & Consolidate to Oracle Database 12c 279
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
TTS Pain Points
 Size
– Solution:
RMAN Incremental Backups
 PERL scripts in MOS Note:1389592.1 and in
MOS Note: 2005729.1
 Source: 10.2.0.3 or newer
 Target: 11.2.0.4 or newer
 Complexity
– Solution:
Full Transportable Export/Import
 Data Pump feature allows
One Command Migration
 Source: 11.2.0.3 or newer
 Target: 12.1.0.1 or newer
Upgrade, Migrate & Consolidate to Oracle Database 12c 280
Can be combined
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Pure Transportable Tablespace with Incremental Backups
DESTINATION Database 12.1.0.2
SCOTT
HUGO
SOURCE Database 11.2.0.4
VIEWS
CODE
PRIVS
SCOTT
HUGO
SYSTEM
SYSAUX
UNDO
TEMP
SYSTEM
SYSAUX
UNDO
TEMP
VIEWS
CODE
PRIVS
Data Pump
Convert and apply
backups
Read Only
expdp "'"sys/sys as sysdba"'" …
TRANSPORT_TABLESPACES=TS1,TS2 …
impdp "'"sys/sys as sysdba"'"…
TRANSPORT_DATAFILES=…
Downtime!!!
Read Write
Upgrade, Migrate & Consolidate to Oracle Database 12c 281
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Full Transportable Export/Import in 3 Steps
282



Copy the datafiles or Restore/Merge Inc Backups
Data Pump
"One Command Migration"
Create a new database or PDB
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Full Transportable Export/Import with Copies
DESTINATION Database 12.1.0.2
SCOTT
HUGO
SOURCE Database 11.2.0.4
VIEWS
CODE
PRIVS
SCOTT
HUGO
SYSTEM
SYSAUX
UNDO
TEMP
SYSTEM
SYSAUX
UNDO
TEMP
VIEWS
CODE
PRIVS
Data Pump
Read Only
Upgrade, Migrate & Consolidate to Oracle Database 12c 283
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Full Transportable Export/Import with Backups
DESTINATION Database 12.1.0.2
SCOTT
HUGO
SOURCE Database 11.2.0.4
VIEWS
CODE
PRIVS
SCOTT
HUGO
SYSTEM
SYSAUX
UNDO
TEMP
SYSTEM
SYSAUX
UNDO
TEMP
VIEWS
CODE
PRIVS
Data Pump
Convert and apply
backups
Read Only
Upgrade, Migrate & Consolidate to Oracle Database 12c 284
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Let's do it
Full Transportable Export/Import
using RMAN Incremental Rolled Foward Backups
Upgrade, Migrate & Consolidate to Oracle Database 12c 285
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Overview - Phases
 Phase 1 - Initial Setup phase
 Phase 2 - Prepare phase
 Phase 3 - Roll Forward phase
 Phase 4 - Final Incremental Backup
 Phase 5 - Transport Phase: Import all Metadata
 Phase 6 - Validate the Transported Tablespaces
 Phase 7 - Cleanup
Upgrade, Migrate & Consolidate to Oracle Database 12c 286
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 1 - Initial Setup phase
 Download the PERL scripts from MOS Note:1389592.1
– Key scripts:
– Extract them to: /home/oracle/xtt
Upgrade, Migrate & Consolidate to Oracle Database 12c 287
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 1 - Initial Setup phase
 Choose the best method
– RMAN backup / convert
 Faster
 Requires staging space for CONVERT
 xttdriver.pl -p and -c
– DBMS_FILE_TRANSFER
 Slower
 Does not require staging space
 CONVERT happens implicitly
 xttdriver.pl -S and -G
Upgrade, Migrate & Consolidate to Oracle Database 12c 288
Staging
Backup Convert
Restore &
Convert
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 1 - Initial Setup phase
 Create a destination database
– For Full Transportable Export/Import:
 SourceDB must be 11.2.0.3 or higher
 DestDB must be 12.1.
– COMPATIBLE equal or higher
– Identical database character sets
– Identical national characher sets
– Identical time zone versions
Upgrade, Migrate & Consolidate to Oracle Database 12c 289
Oracle Database
Release
Default
Time Zone
Version
10.2.0.3, 10.2.0.4, 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, 11.2.0.4 DST V14
12.1.0.1, 12.1.0.2 DST V18
Most recent interim patch:
See MOS Note:412160.1
DST V24
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 1 - Initial Setup phase
 Identify tablespaces to be transported
 Configure:
Upgrade, Migrate & Consolidate to Oracle Database 12c 290
xtt.properties
## Tablespaces to transport
## ========================
tablespaces=TS1,TS2
## Source database platform ID
## ===========================
platformid=13
## Source system file locations
## ============================
## Location where datafile copies are created
## during the "-p prepare" step.
dfcopydir=/oracle/DQ1/rman_stage
## backupformat
## ------------
## Location where incremental backups are created.
backupformat=/oracle/DQ1/rman_stage
## Destination system file locations
## =================================
## Location where datafile copies are placed by the user
## when they are transferred manually from souce system.
stageondest=/oracle/DQ1/rman_stage
## storageondest
## -------------
## Location where the converted datafile copies will be
## written during the "-c conversion of datafiles" step.
## This is the final location of the datafiles
## where they will be used by the destination database.
storageondest=/oracle/DQ1/sapdata50
## backupondest
## ------------
## Location where converted incremental backups
## on the destination system will be written during
## the "-r roll forward datafiles" step.
backupondest=/oracle/DQ1/rman_stage_incr
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 1 - Initial Setup phase
 Enable block change tracking in source database
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '<name>' REUSE;
 Copy all xtt-scripts to the destination host
 Set TMPDIR=/home/oracle/xtt on both hosts
Upgrade, Migrate & Consolidate to Oracle Database 12c 291
Copy xtt scripts including modified xtt.properties
/home/oracle/xtt /home/oracle/xtt
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 2 - Prepare phase
 Create data file copies on source
– [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –p
– Creates the following files used later:
 xttplan.txt
 rmanconvert.cmd
Upgrade, Migrate & Consolidate to Oracle Database 12c 292
Staging
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 2 - Prepare phase
 Transfer files to destination host
– Not necessary if your staging location is available to the destination host (NFS etc)
– xtt.properties: dfcopydir = stageondest
Upgrade, Migrate & Consolidate to Oracle Database 12c 293
Staging
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 2 - Prepare phase
 Copy rmanconvert.cmd to destination
 Convert the data file copies and write them to storageondest
– [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –c
Upgrade, Migrate & Consolidate to Oracle Database 12c 294
Copy
rmanconvert.cmd
/home/oracle/xtt
Staging
C
C
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 3 - Roll Forward phase
 Create incremental backups on source
– [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i
– Creates the following files used later:
 tsbkupmap.txt
 incrbackups.txt [not necessary here due to NFS mount]
Upgrade, Migrate & Consolidate to Oracle Database 12c 295
Staging
i
i
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 3 - Roll Forward phase
 Transfer incremental backups to destination host
– Not necessary if your staging location is available to the destination host (NFS etc)
– xtt.properties: backupformat= stageondest
Upgrade, Migrate & Consolidate to Oracle Database 12c 296
Staging
i
i
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 3 - Roll Forward phase
 Copy xttplan.txt and tsbkupmap.txt to destination
 Convert the inc backups and merge them into tablespace files on storageondest
– [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –r
Upgrade, Migrate & Consolidate to Oracle Database 12c 297
Copy
tsbkupmap.txt
/home/oracle/xtt
Staging
xttplan.txt
iC
iC
iC
iC
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 3 - Roll Forward phase
 Record FROM_SCN on source for next incremental backup
– [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -s
– Writes it into xttplan.txt
Upgrade, Migrate & Consolidate to Oracle Database 12c 298
Staging
xttplan.txt
SCN
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 3 - Roll Forward phase
 Repeat entire Phase 3 as often as necessary
– Increase of frequency will decrease file sizes
Upgrade, Migrate & Consolidate to Oracle Database 12c 299
Staging
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 4 - Final Incremental Backup
 Set tablespaces read/only – Downtime!
– SQL:SOURCEDB> alter tablespace TS1 read only;
SQL:SOURCEDB> alter tablespace TS2 read only;
Upgrade, Migrate & Consolidate to Oracle Database 12c 300
Staging
Read Only
Read Only
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 4 - Final Incremental Backup
 Create final incremental backup on source
– [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i
Upgrade, Migrate & Consolidate to Oracle Database 12c 301
Staging
i
i
Read Only
Read Only
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 4 - Final Incremental Backup
 Copy xttplan.txt and tsbkupmap.txt to destination
 Convert final inc backups and merge them into tablespace files
– [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –r
Upgrade, Migrate & Consolidate to Oracle Database 12c 302
Copy
tsbkupmap.txt
/home/oracle/xtt
Staging
xttplan.txt
Read Only
Read Only
iC
iC
iC
iC
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Link
Phase 5 - Transport Phase: Import all Metadata
 Prepare destination database for Full Transportable Export/Import
– SQL:DESTDB> CREATE DIRECTORY ftex_dir AS '/home/oracle/dp';
– SQL:DESTDB> GRANT READ, WRITE ON DIRECTORY ftex_dir TO mike;
– SQL:DESTDB> CREATE PUBLIC DATABASE LINK v112 USING 'v112';
Upgrade, Migrate & Consolidate to Oracle Database 12c 303
iRead Only
Read Only
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Link
Phase 5 - Transport Phase: Import all Metadata
 Start Full Transportable Export/Import
– [oracle@dest]$ impdp mike/passwd@v121 NETWORK_LINK=v112
FULL=Y TRANSPORTABLE=ALWAYS [VERSION=12]
METRICS=Y EXCLUDE=STATISTICS
LOGTIME=ALL LOGFILE=ftex_dir:v112fullimp.log
TRANSPORT_DATAFILES='/oracle/DQ1/sapdata50/ts1.dbf'
TRANSPORT_DATAFILES='/oracle/DQ1/sapdata50/ts2.dbf'
Upgrade, Migrate & Consolidate to Oracle Database 12c 304
iRead Only
Read Only
impdp FULL=Y TRANSPORTABLE=ALWAYS
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 6 - Validate the Transported Tablespaces
 Validate transported tablespaces
– RMAN> validate tablespace TS1, TS2 check logical;
Upgrade, Migrate & Consolidate to Oracle Database 12c 305
Read Only
Read Only
RMAN>
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Phase 7 - Cleanup
 Set tablespaces on source read/write
 Cleanup all files created for this process
 Cleanup staging area if not done already
Upgrade, Migrate & Consolidate to Oracle Database 12c 306
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Yes, we made it 
It looks a bit complicated at first sight but once you tried it, it may be the game changer
Upgrade, Migrate & Consolidate to Oracle Database 12c 307
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Documentation and Information
 Transportable Tablespaces – Information
– MOS Note:1166564.1 Master Note for Transportable Tablespaces
Common Questions and Issues
– MOS Note:1454872.1 Transportable Tablespace Restrictions and Limitations: Details, Reference, and
Version Where Applicable
– For TTS White Papers see the MAA webpage:
http://www.oracle.com/technetwork/database/features/availability/oracle-database-maa-
best-practices-155386.html
– Database Upgrades using TTS:
http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-upgradetts-
132620.pdf
– Platform Migration using Transportable Database (RMAN):
http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-
platformmigrationtdb-131164.pdf
– Customer example: Amadeus Customer Case
http://www.oracle.com/technetwork/database/features/availability/s281209-amadeus-
130978.pdf
308Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
EBS Upgrades
 Resources for EBS
– MOS Note:1581549.1
Best Practices for Minimizing Oracle E-Business Suite Release 12 Upgrade
Downtime
 Oracle recommends that you upgrade to the latest Database version
certified for your EBS release
– MOS  Certifications  E-Business Suite  <version>  <platform>
 Then select the latest certified database release
309Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
310Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Zero Downtime5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 5: Near-Zero Downtime
 Platform migration with near-zero downtime
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
311Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Introduction
 True ZERO Downtime is about more than the database
– Oracle TimesTen In-Memory Database can do that
– Oracle GoldenGate can deliver zero operational downtime depending on the application
 Replication technologies are easier to handle and setup
– A limited downtime will occur to switch clients/application
 Active/active scenarios are possible depending on the application and usage scenario
 Concept:
 Technologies:
– Oracle GoldenGate
 NOTE: Oracle Streams is deprecated as of Oracle Database 12c
Capture
Source
Move/Upgrade Database
Destination
Apply
Destination
Synch?
Source  Destination
312Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate
 Paid option of the database
– Migratable license for 1 year which includes Active Data Guard
 Works with many Oracle database versions
– GoldenGate 12.1 supports Oracle ≥ 11.1.0.6
 GoldenGate 11.2 supports Oracle ≥ 10.2.0.4
– For earlier database versions (8i (DML only), 9i-11.1) use GoldenGate 10.4
 Oracle GoldenGate Installation and Setup Guide
 Also works with non-Oracle databases (DB2, Teradata …)
 GoldenGate White Paper: Zero Downtime Upgrade with OGG
http://www.oracle.com/technetwork/middleware/goldengate/overview/ggzerodowntimedatabaseupgrades-174928.pdf
313Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Is your database ready for Oracle GoldenGate?
 Complete Database Profile OGG readiness check
– MOS Note:1298562.1:
Oracle GoldenGate database Complete Database Profile check script for Oracle DB (All
Schemas) Classic Extract
 Check OGG readiness for Schema Only
– MOS Note: 1296168.1
Oracle GoldenGate database Schema Profile check script for Oracle DB

314Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 5: Near-Zero Downtime
 Platform migration with near-zero downtime
Start Capture Mechanism
Build Up Database Copy with
Data Pump or TTS
Start Apply Mechanism
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
315Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Capture
Capture: committed transactions are captured (and can be filtered) as
they occur by reading the transaction logs
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
316Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Capture
Trail: stages and queues data for routing
Trail
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
317Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Capture Trail
Build up the target database using:
- Transportable Tablespaces x-Platform
- Export/Import with Data Pump
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
318Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Capture Trail
Pump: distributes data for routing to target(s)
Pump
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
319Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Route: data is compressed, encrypted for routing to target(s)
Capture Trail Pump Trail
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
320Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
Delivery: applies data with transaction integrity,
transforming the data as required
Capture Trail Pump Trail Delivery
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
321Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Start Capture Mechanism
Build Up Database Copy
with Data Pump or TTS
Start Apply Mechanism
GoldenGate works bidirectionally -
from higher to lower release as well!
Capture Trail Pump Trail Delivery
Oracle 10.2.0.3
HP-UX Itanium
<5 mins
10TB
Oracle 12.1.0.2
OL5.8 64bit
10TB
Bi-directional
322Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 323
Migration with GoldenGate
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Amadeus is a leading transaction processor for the
global travel and tourism industry
DISTRIBUTION
BUSINESS IT SOLUTIONS
711 airlines
110,000+ hotel properties
30 car rental companies
50+ cruise and ferry lines
207 tour operators
24 insurance companies
95 railways
Inventory
Departure Control
e-Commerce
Airlines
Airports
Hotels
Rail
20,000+ tx/sec (peak)
< 0.3 sec response time
10 Petabytes of storage
3+ million net bookings/day
> 1 billion tx/day
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 324
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Migrate Oracle 10g production databases to Oracle 11g on
new HW and/or OS platform
Source Target
Oracle 10.2.0.3
RAC
HPUX v2
Oracle 11.2.0.2/3
RAC
HPUX v3
Oracle 11.2.0.2/3
RAC
RHE Linux
Oracle 10.2.0.3
Single Instance
HPUX v2
Oracle 11.2.0.2/3
RAC One
RHE Linux
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 325
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Fixed quarterly outage windows
 Maximum of 5 minutes database downtime
 No service impact outside the outage window
 Endian change: HP-UX  to Linux (big  little endian)
 Possibility of fallback during and after the outage
 High volume of DB changes (redo of up to 20MB/sec)
 Large database sizes (up to 14TB)
 Possibility for physical re-organization
- Fresh data dictionary
- Tablespace and partitioning redesign
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 326
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 In-depth proof of concept (supported by Oracle)
– Focusing on functional aspects
– Focusing on data volume
 Standardized migration process model with timeline
 Home-made scripts and procedures to support setup,
monitoring, tuning and switch over
 Training of in-house specialist supporting the DBAs
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 327
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Comparison of source/target DB content (Veridata)
 Rehearsals of switch over and fallback
 Switch over: Stop replication / Start reverse-replication
 Instantiation of new 11g database: expdp from Physical Standby
 Installation, configuration, tuning of GG replication
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 328
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 15 databases successfully migrated, so far (Oct 2012)
 Switchover duration: 2-6 minutes
 No fallback performed
Source Target Migrated
Oracle 10.2.0.3
RAC
HPUX v2
Oracle 11.2.0.2/3
RAC
HPUX v3
6
Oracle 11.2.0.2/3
RAC
RHE Linux
3
Oracle 10.2.0.3
Single Instance
HPUX v2
Oracle 11.2.0.2/3
RAC One
RHE Linux
6
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 329
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 The concept proved to handle a smooth and
secure migration across different DB versions and
HW/OS platforms
 To be considered …
 Instantiation of target database (incl. Plan Stability)
 Customized GG setup per database
 Handling of unsupported data types (e.g. ANYDATA)
 Impact of supplemental logging on source DB
 Effort of tuning GG for DBs with high DML rate (e.g.
parallel replicate processes)
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 330
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
331Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Rolling Upgrade6
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 6: Real Rolling Upgrade
 Rolling database upgrade with less than 5 min downtime
Oracle 11.1.0.7
OL5.6 64bit
<5 mins
5TB
Oracle 12.1.0.2
OL5.8 64bit
5TB
332Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Case 6: Real Rolling Upgrade
 Rolling database upgrade with less than 5 min downtime
Create a
Physical
Standby
Convert 
Logical
Standby
Upgrade
Logical
Standby
Switchover
PROD
Logical
Flashback
Logical
Convert 
Physical
Upgrade via
Redo Apply
Switchover
PROD 
Physical
Oracle 11.1.0.7
OL5.6 64bit
<5 mins
5TB 5TB
Oracle 11.1.0.7
PHYSICAL STANDBY
Oracle 11.1.0.7
LOGICAL STANDBY
Oracle 11.2.0.4
LOGICAL STANDBY
Oracle 12.1.0.2
OL6 64bit
333Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Basic Facts and Information
 Different types of standby databases
Physical Standby Logical
Standby
Transient Standby
Standby
Type
Block identical copy
of PROD
Logical copy of
PROD
Physical, converted temporarily into
Logical – and return
Apply
Technique
Redo Apply SQL Apply Redo and SQL Apply
Build Up RMAN DUPLICATE Convert from
Physical
RMAN Duplicate, then Convert
Switchover < 1 min Seconds Seconds + < 1 min
334Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transient Logical Standby
 Concept:
– Build up a Physical Standby database
– Convert the Physical Standby into a Logical Standby
– Upgrade the Logical Standby database
– Switchover – Standby will be production system now
– Then: Flashback the former production database
– Convert it into a Physical Standby
– Upgrade just by log apply
– Eventually: Switchover to the original setup
 Works pretty straight forward with Oracle Database 11g
– Will work with Oracle Database 10g as well but requires more steps
335Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transient Logical Standby - Workflow
336
LSTBYPSTBY
Guaranteed
Restore Point

PROD
synchronize
Logminer
Build
KEEP IDENTITY

synchronize

PROD
SWITCHOVER
FLASHBACK
DATABASE TO ...

PSTBY
synchronize
=UPGRADE

LSTBY
New $OH
+
Upgrade

CONVERT TO
PHYSICAL
New $OH

PROD
PSTBY
SWITCHOVER

Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transient Logical Standby – White Paper
 Transient Upgrade Concept:
http://www.oracle.com/technetwork/database/features/availability/maa-wp-
11g-transientlogicalrollingu-1-131927.pdf
 Shell scripts in Note:949322.1 for automation:
http://www.oracle.com/technetwork/database/features/availability/maa-wp-
11g-upgrades-made-easy-131972.pdf
337Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBMS_ROLLING
 Data Guard Simple Rolling Upgrade
– Semi-automation of Transient Logical Standby Rolling Upgrade
– Works with Data Guard Broker
– Procedure DBMS_ROLLING
– Usable for maintenance tasks beginning with Oracle 12.1.0.1
– Usable for upgrades beginning with the first patch set of Oracle 12c
 DBMS_ROLLING usage will require a license for Active Data Guard
 INIT_PLAN
 DESTROY_PLAN
 BUILD_PLAN
 SET_PARAMETER
 START_PLAN
 SWITCHOVER
 FINISH_PLAN
 ROLLBACK_PLAN
338Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBMS_ROLLING - Planning & Setup Phase
 Generate an upgrade plan
– Call DBMS_ROLLING.INIT_PLAN
 Generates an upgrade plan with a configuration specific set of instructions to guide
the administrator through the upgrade process
– Call DBMS_ROLLING.SET_PARAMETER
 Modify parameters of the rolling upgrade
 Prepare your changes to the database
339Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBMS_ROLLING – Execution Phase
 Start the Execution Phase
– Call DBMS_ROLLING.START_PLAN
 Configures primary and standby databases participating in the upgrade
 Make changes to the standby database
– Upgrade time
 Role exchange
– Call DBMS_ROLLING.SWITCHOVER
 Swaps roles between current primary and new primary with the changes, switchover
is only downtime required
340Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBMS_ROLLING – End Phase
 Finish the Rolling Upgrade
– Call DBMS_ROLLING.FINISH_PLAN
 Completes upgrade of the old primary and bystanders and resynchronizes with the new
primary
341Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Nippon Steal & Sumitomo Metal - Factory System
Benefits
Business Objectives
• High availability
• DB Infra consolidation
Solution
• Adopting Exadata providing
high performance and high
availability
• Rolling upgrade using Data
Guard minimizes planned
downtime
“Consolidating 4 Databases including Steal factory systems
onto Exadata providing High performance and reliability,
Enabling making use of High Quality of infrastructure.”
Minimize planned
Downtime
High
performance
Consolidation
of database
DB-A
DB-B
DB-C
DB-D
DB-A
(standby)
DB-B
(standby)
DB-C
(standby)
DB-D
(standby)
DB-A
(test)
DB-B
(test)
DB-C
(test)
DB-D
(test)
Monitored by EM12c & ASR Manager
X3-2 Eighth
(production)
X3-2 Eighth
(Standby /Dev/ Test)
Data Guard
(Physical/
Transient Logical)
• Rolling upgrade using Transient
Logical Standby realized
minimizing downtime of upgrading
DB (11.2.0.311.2.0.4)
• 5 minutes downtime x 2times
(switchover) per 1 DB
• Mainframe migration
• Consolidating 4 DBs including Steal
factory system & DWH onto
Exadata
5 minutes
342Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 343
Speed up the upgrade
with Transient Standby
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Bielefeld University, Germany
– Mid size university in Germany
– 18,000 students and
1,600 employees
– IT lead for 33
German universities
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 344
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Goal:
– Decrease patching downtime to less than 5 minutes
 Stage 1:
– Upgrade/migrate 10 key DBs from Oracle 9.2 to Oracle 11g
 Single Instance  RAC, ASM, Data Guard
 Stage 2:
– Rolling upgrade from Oracle 11.1.0.6 to 11.1.0.7
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 345
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 Less then 5 minutes downtime
– Database patch set and release upgrade
 No downtime
– Clusterware and ASM upgrades and PSUs
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 346
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Stage 1:
– Several test migrations and upgrades
– Similar test system to the production Oracle/SUN Solaris cluster,
including test standby system
– Setup Oracle Grid Control
– Performance monitoring with SPA
– Tuning with SQL Tuning/Access Advisor
 Stage 2:
– Test the rolling upgrade with Transient Standby
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 347
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 348
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Yes 
– Friday, February 13/14, 2009:
 Transient Standby for the database upgrade from Oracle Database 11.1.0.6 to
11.1.0.7
 2 minutes overall downtime
 OOW 2009 presentation
– July 30, 2012:
 Rolling upgrade from Oracle Clusterware/ASM 11.1.0.7 to Oracle Grid
Infrastructure 11.2.0.3 with ASM without any downtime
 Rolling upgrade with OPatch apply -minimize_downtime for July 2012
PSU with no downtime
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 349
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 The XDB component was INVALID before the upgrade
– Logminer was not willing to extract logs
– Lesson learned:
Make sure all components in DBA_REGISTRY are VALID
 Further information:
– Database Rolling Upgrade Using Transient Logical Standby
http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-transientlogicalrollingu-1-131927.pdf
– Database Rolling Upgrades Made Easy by Using a Data Guard Physical
Standby Database
http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-upgrades-made-easy-131972.pdf
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 350
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
351Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
7
Consolidate
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 352
Plug into Oracle Multitenant
Upgrade, Migrate & Consolidate to Oracle Database 12c
1
2
3
4
Overview
Plug in
Upgrade
Working
Reality5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
What is Single Tenant? What is Multitenant?
This will be answered within the upcoming 45 minutes
Upgrade, Migrate & Consolidate to Oracle Database 12c 353
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Three possible database deployments in Oracle 12c
 Stand Alone  Single Tenant
– One active PDB
 Multitenant
– Up to 252 active PDBs
Upgrade, Migrate & Consolidate to Oracle Database 12c 354
CDB$ROOT
PDB$
SEED
PDB1
CDB$ROOT
PDB$
SEED
PDB1 PDB1 ...
DB
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Three possible database deployments in Oracle 12c
 Stand Alone
– Same as in previous releases
 Single Tenant
– No extra license required
– Possible with SE and EE
 Multitenant
– Requires Multitenant license
– Requires Enterprise Edition
Upgrade, Migrate & Consolidate to Oracle Database 12c 355
CDB$ROOT
PDB$
SEED
PDB1
CDB$ROOT
PDB$
SEED
PDB1 PDB1 ...
DB
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Some well-known concepts will change
 >200 pages new documentation in
the Administrator’s Guide
– https://docs.oracle.com/database/121/ADMIN/part_cdb.htm#BGBIDDFD
 Oracle Multitenant Overview WP
– http://www.oracle.com/technetwork/database/multitenant-wp-12c-1949736.pdf
Upgrade, Migrate & Consolidate to Oracle Database 12c 356
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Why you must play with Oracle Single/Multitenant
 Oracle Database 12c non-CDB works as expected
 You don't have to use Oracle Multitenant
– But …
https://docs.oracle.com/database/121/UPGRD/deprecated.htm#BABDBCJI
Upgrade, Migrate & Consolidate to Oracle Database 12c 357
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Single/Multitenant – Concepts
CDB1_SIN
PDB$
SEED
CDB2_SIN
PDB$
SEED
PDB1
PDB1
Upgrade, Migrate & Consolidate to Oracle Database 12c 358
CDB1_MUL
PDB$
SEED
CDB2_MUL
PDB$
SEED
PDB1 PDB2 PDB3
PDB1
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Single/Multitenant – Sharing Resources
CDB
PDB$
SEED
PDB1 PDB2 PDB3
Redo Control Flashbackspfile
Upgrade, Migrate & Consolidate to Oracle Database 12c 359
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
New Container Database – DBCA vs. Scripts
Upgrade, Migrate & Consolidate to Oracle Database 12c 360
Create a
new
Container
Database
Create a
new
Pluggable
Database
or
Plugin an
Oracle 12c
Database
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
DBCA: Create a container database
 All options will be created
Upgrade, Migrate & Consolidate to Oracle Database 12c 361
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Scripts: Create a container database
 Create a Custom Database in DBCA
 Scripts Only
 Command Line
– Subset of options possible
 MOS Note: 2001512.1
Creating a CDB with a Subset of Options
Upgrade, Migrate & Consolidate to Oracle Database 12c 362
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Scripts: Create a container database
 Subset of Database Options?
 See:
– MOS Note: 2001512.1
Creating a CDB with a subset of options
– MOS Note: 1616554.1
Customization of Database Options in a
Multitenant Setup
 Scripts to edit:
– CreateDBCatalog.sql
 Remove Workspace Manager (owminst.plb)
– <SID>.sql
 Remove all unwanted components
 Be aware of dependencies
Upgrade, Migrate & Consolidate to Oracle Database 12c 363
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Run SQL scripts with catcon.pl
 Administrative scripts have to be started via catcon.pl:
– Most useful catcon.pl options:
 -u Username and optionally password
 -d Directory containing the script to execute
(default: current directory)
 -e Echo on
 -s Spools the output of every script
 -l Directory to write logfiles into
(default: current directory)
 -b Base name for logfiles (mandatory option)
 -c Containers in which to run sql scripts
 -f Ignore PDBs which are closed
– See MOS Note: 1932340.1 - How to execute sql scripts in Multitenant environment (catcon.pl)
$> $ORACLE_HOME/perl/bin/perl catcon.pl -u SYS -d
$ORACLE_HOME/rdbms/admin –e -s -b create_dictionary catcdb.sql
Upgrade, Migrate & Consolidate to Oracle Database 12c 364
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Example catcon.pl
 Run the preupgrd.sql in all containers
 -n Parallel degree – undocumented
 -d Directory containing the script to execute
 -l Directory to write logfiles into
 -b Base name for logfiles (mandatory option)
Upgrade, Migrate & Consolidate to Oracle Database 12c 365
$> $ORACLE_HOME/perl/bin/perl
$ORACLE_HOME/rdbms/admin/catcon.pl
-n 1
-d $ORACLE_HOME/rdbms/admin
-l /home/oracle/upgrade
-b preupgrd
preupgrd.sql
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CDB-PDB: Who's who?
CDB$ROOT
PDB$SEED
OBJ$ TAB$ SOURCE$
PDB1
EMP DEPT
OBJ$ TAB$ SOURCE$
Upgrade, Migrate & Consolidate to Oracle Database 12c 366
PDB2
EMP DEPT
OBJ$ TAB$ SOURCE$
 Data dictionary and objects
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CDB-PDB: Who's who?
 Common user (common_user_prefix)
 Local user
Upgrade, Migrate & Consolidate to Oracle Database 12c 367
CDB$
ROOT
PDB$SEED
PDB1
PDB2
HUGO
SCOTT
HUGO
SCOTT
SYS C##ADMC##BOSS
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CDB-PDB: Who's who?
 Tablespaces
Upgrade, Migrate & Consolidate to Oracle Database 12c 368
CDB$ROOT
PDB$SEED
PDB1
PDB2
SYSTEM
SYSAUX
TEMP
UNDO
SYSTEM
SYSAUX
SYSTEM
SYSAUX
DATA1
DATA2
TEMP
SYSTEM
SYSAUX
DATA1
DATA2
TEMP
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Footprint on Disk – Single Tenant
 Each container has its own SYSTEM tablespace
 Each container has its own SYSAUX tablespace
 CDB$ROOT and PDB have their own TEMP tablespaces
Upgrade, Migrate & Consolidate to Oracle Database 12c 369
CDB$ROOT
PDB$
SEED
PDB1
SYSTEM
SYSAUX
TEMP
SYSTEM
SYSAUX
USERS
TEMPSYSTEM SYSAUX
USERSUNDO
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 370
Plug into Oracle Multitenant
Upgrade, Migrate & Consolidate to Oracle Database 12c
1
2
3
4
Overview
Plug in
Upgrade
Working
Reality5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Creation of a New Pluggable Database
 Fast provisioning from PDB$SEED
– PDB_FILE_NAME_CONVERT
CDB
PDB$
SEED
PDB1
create pluggable database PDB1
admin user adm1 identified by pwd
file_name_convert=(
'/oradata/CDB2/pdbseed',
'/oradata/CDB2/pdb1')
i
m
p
d
p
 Transport with TTS or FTEX
 Import data with impdp
– Dump file or NETWORK_LINK
– imp for ≤ Oracle 9i
Upgrade, Migrate & Consolidate to Oracle Database 12c 371
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Cloning of a Pluggable Database
 Fast cloning of a PDB
– Local*:
* not available with Single Tenant
– Remote:
 @CDB1 specifies a database link!!!
 In Oracle 12.1 the source PDB must be quiesced
CDB1
PDB$
SEED
CDB2
PDB$
SEED
PDB1 PDB2
PDB1
create pluggable database
PDB2 from PDB1;
create pluggable database
PDB1 from PDB1@CDB1;
Upgrade, Migrate & Consolidate to Oracle Database 12c 372
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Cloning of a Pluggable Database
 Also supported:
– Snapshot cloning with ACFS, ZFS and NetApp
 CREATE PLUGGABLE DATABASE pdb2 FROM pdb1
SNAPSHOT COPY;
 Since Oracle Database 12.1.0.2
– Subset Cloning
 CREATE PLUGGABLE DATABASE pdb2 FROM pdb1
FILE_NAME_CONVERT=('..','/..')
USER_TABLESPACES=('data1', 'data2');
– Metadata Cloning
 CREATE PLUGGABLE DATABASE pdb2 FROM pdb1
FILE_NAME_CONVERT=('..','/..')
NO DATA;
CDB1
PDB$
SEED
CDB2
PDB$
SEED
PDB1 PDB2
PDB1
Upgrade, Migrate & Consolidate to Oracle Database 12c 373
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade and Plugin as PDB
 Database upgrade
CDB
PDB$
SEED
PDB1
exec DBMS_PDB.DESCRIBE('PDB1.xml');
DB1
create pluggable database PDB1
using ('PDB1.xml') nocopy tempfile reuse;
start ?/rdbms/admin/noncdb_to_pdb.sql
PDB1
xml
Read Only
Upgrade, Migrate & Consolidate to Oracle Database 12c 374
 Start database read-only
 Create XML description file
 Shutdown database
 Plugin database
 Sanity operations
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
noncdb_to_pdb.sql
 Sanity script when pluging in a stand-alone database
 Irreversible
 Runs only once in the life of a database
 Runtime depends ...
Upgrade, Migrate & Consolidate to Oracle Database 12c 375
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Full Transportable Export/Import
 Create a fresh database/PDB
CDB
PDB$
SEED
PDB1
DB1
Database Link
impdp oow/passwd@PDB1
NETWORK_LINK=DB1 VERSION=12 FULL=Y
TRANSPORTABLE=ALWAYS METRICS=Y
LOGFILE=oow_dir:src112fullimp.log
TRANSPORT_DATAFILES='/oradata/ts1.dbf' …
Read Only
impdp
 Create database link to source
 Tablespaces read-only – downtime!
 Copy datafiles to destination
 Run impdp on NETWORK_LINK
Upgrade, Migrate & Consolidate to Oracle Database 12c 376
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 377
Plug into Oracle Single-/Multitenant
1
2
3
4
Overview
Plug in
Upgrade
Working
Reality
How Oracle Single/Multitenant will change a DBA's life
5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Why does a PDB require an upgrade?
 Each PDB has its own Data Dictionary
– The documentation states:
 Comparing OBJ$ in CDB$ROOT
versus PDB
How Oracle Single/Multitenant will change a DBA's life 378
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: Two Strategies
 Everything at once  Unplug/plugin/upgrade
How Oracle Single/Multitenant will change a DBA's life 379
CDB1 – Oracle 12.1.0.1
PDB$
SEED
CDB2 – Oracle 12.1.0.2
PDB$
SEED
PDB1
PDB1
PDB1
xml
CDB1 – Oracle 12.1.0.2
PDB$
SEED
PDB1
CDB1 – Oracle 12.1.0.1
PDB$
SEED
PDB1
UPGRADE
UPGRADE
UPGRADE
UPGRADE
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: Everything at once
 2 upgrade cycles
– Cycle 1: CDB$ROOT
– Cycle 2: PDB$SEED and PDB
 Execute all scripts with catcon.pl
How Oracle Single/Multitenant will change a DBA's life 380
CDB1 – Oracle 12.1.0.2
PDB$
SEED
PDB1
CDB1 – Oracle 12.1.0.1
PDB$
SEED
PDB1
UPGRADE
UPGRADE
UPGRADE
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: Everything at once
 Overview description - detailled steps can be found at:
https://blogs.oracle.com/UPGRADE/entry/upgrade_pdbs_everything_at_once1
 Source:
– Copy new preupgrd.sql and utluppkg.sql into source' $OH/rdbms/admin
– $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -d $ORACLE_HOME/rdbms/admin -l
/home/oracle/mike -b preupgrd preupgrd.sql
– ALTER PLUGGABLE DATABASE ALL OPEN;
– $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -
d $ORACLE_HOME/cfgtoollogs/cdbupgr/preupgrade -l /home/oracle/mike -b preupgrade_fixups
preupgrade_fixups.sql
 Destination:
– STARTUP UPGRADE
– ALTER PLUGGABLE DATABASE ALL OPEN UPGRADE;
– cd $ORACLE_HOME/rdbms/admin
– $ORACLE_HOME/perl/bin/perl catctl.pl -d $ORACLE_HOME/rdbms/admin -n 16 -M -l /home/oracle/mike
catupgrd.sql
 The important file with timings per PDB for a quick check is called upg_summary.log and can be found in:
$ORACLE_HOME/cfgtoollogs/<SID>/upgrade/upg_summary.log
– STARTUP
– ALTER PLUGGABLE DATABASE ALL OPEN;
– $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -
d $ORACLE_HOME/cfgtoollogs/cdbupgr/preupgrade -l /home/oracle/mike -b postupgrade_fixups
postupgrade_fixups.sql
– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.
– How Oracle Single/Multitenant will change a DBA's life 381
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: Unplug/plug/upgrade
 1 upgrade cycle
– PDB only
 With or without catcon.pl
 You must take a backup
immediately after upgrade!!!
How Oracle Single/Multitenant will change a DBA's life 382
CDB1 – Oracle 12.1.0.1
PDB$
SEED
CDB2 – Oracle 12.1.0.2
PDB$
SEED
PDB1
PDB1
PDB1
xml
UPGRADE
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: One/many at a time – Step by Step – 1/2
 In CDB1:
 alter session set container=PDB1;
 @?/rdbms/admin/preupgrd.sql
 @/u01/app/oracle/cfgtoollogs/CDB1/
preupgrade/preupgrade_fixups.sql
 exec dbms_stats.gather_dictionary_stats;
 alter sesstion set container=CDB$ROOT;
 alter pluggable database PDB1 close;
 alter pluggable database PDB1 unplug
into '/stage/pdb1.xml';
 drop pluggable database PDB1
keep datafiles;
 exit
 Detailled steps:
https://blogs.oracle.com/UPGRADE/entry/upgrade_pdbs_one_at_a
CDB1 – Oracle 12.1.0.1
PDB$
SEED
CDB2 – Oracle 12.1.0.2
PDB$
SEED
PDB1
PDB1
PDB1
xml
UPGRADE
How Oracle Single/Multitenant will change a DBA's life 383
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade: One/many at a time – Step by Step – 2/2
 In CDB2:
In SQL*Plus:
– alter session set container=CDB$ROOT;
– * create pluggable database pdb1 using
'/stage/pdb1.xml' file_name_convert=(
'/oradata/CDB1/pdb1', '/oradata/CDB2/pdb1');
– alter pluggable database PDB1 open upgrade;
– #exit
On the command prompt:
– $> cd $ORACLE_HOME/rdbms/admin
– $> $ORACLE_HOME/perl/bin/perl catctl.pl –c
"PDB1" catupgrd.sql
Back in SQL*Plus:
– alter session set container=pdb1;
– startup
– @?/rdbms/admin/utlrp.sql
CDB1 – Oracle 12.1.0.1
PDB$
SEED
CDB2 – Oracle 12.1.0.2
PDB$
SEED
PDB1
PDB1
PDB1
xml
UPGRADE
* A Plug-In-Check can be done before this step – but it will always
result in "NO" as COMPATIBLE=12.1.0.2 per default in every
Oracle 12.1.0.2 database when created with the DBCA
How Oracle Single/Multitenant will change a DBA's life 384
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Two Strategies – Pros and Cons?
How Oracle Single/Multitenant will change a DBA's life 385
CDB1 – Oracle 12.1.0.1
PDB$
SEED
CDB2 – Oracle 12.1.0.2
PDB$
SEED
PDB1
PDB1
PDB1
xml
CDB1 – Oracle 12.1.0.2
PDB$
SEED
PDB1
CDB1 – Oracle 12.1.0.1
PDB$
SEED
PDB1
UPGRADE
UPGRADE
UPGRADE
UPGRADE
 Unplug/plugin/upgrade
– Can use catcon.pl
– Only one upgrade
– More manual steps
– New CDB required (resources?)
 Everything at once
– Fewer steps
– Keep name/SID
– catcon.pl must be used
– 3 database upgrades
in 2 upgrade cycles
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Downgrade – Simplified Description
 Works for CDB/PDB entirely as well as for single/multiple PDBs
 Manual tasks
– catdwgrd.sql in current environemt
– catrelod.sql in previous environment
– Don't change COMPATIBLE
 Datapatch must roll back SPUs/PSUs/BPs manually
How Oracle Single/Multitenant will change a DBA's life 386
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 387
Plug into Oracle Single-/Multitenant
1
2
3
4
Overview
Plug in
Upgrade
Working
Reality
How Oracle Single/Multitenant will change a DBA's life
5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Startup – SAVE the STATE
 You need to startup a PDB
– ALTER PLUGGABLE DATABASE pdb1 OPEN;
 By default PDBs need to be started manually
– ALTER PLUGGABLE DATABASE pdb1 SAVE STATE;
 This preserves the last state of a PDB
– ALTER PLUGGABLE DATABASE pdb1 DISCARD STATE;
 This removes any state preservation
How Oracle Single/Multitenant will change a DBA's life 388
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
CON_ID - The Important Differentiator
How Oracle Single/Multitenant will change a DBA's life 389
CON_ID
~1000 CDB views
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Character Sets in Oracle Multitenant
 Only 1 common character set
 Conversion required?
– DMU 2.0 can convert character sets before or after plug-in
CDB
PDB$
SEED
PDB1
DB1
How Oracle Single/Multitenant will change a DBA's life 390
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameters in a PDB
 Over 180 parameters can be adjusted per single PDB
– SPFILE: Parameters valid for all containers
– V$SYSTEM_PARAMETER: Parameters valid within a PDB
CDB
PDB$
SEED
PDB1
How Oracle Single/Multitenant will change a DBA's life 391
SELECT name FROM v$parameter
WHERE ispdb_modifiable='TRUE';
SELECT name, value FROM v$system_parameter
WHERE con_id=n;
SELECT name, value FROM v$system_parameter;
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Standby Databases
 Provision a new PDB  Cloning of a PDB – ADG!!
– Not for Single Tenant or SE2
 Plugin an existing PDB
How Oracle Single/Multitenant will change a DBA's life 392
CDB_PROD
PDB$
SEED
CDB_STBY
PDB$
SEED
PDB1
PDB1
CDB_PROD
PDB$
SEED
CDB_STBY
PDB$
SEED
PDB1
PDB1
PDB2
PDB2
CDB_PROD
PDB$
SEED
CDB_STBY
PDB$
SEED
PDB1
PDB1
Manual
copy
required
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
RAC Node 1
RAC and PDBs
How Oracle Single/Multitenant will change a DBA's life 393
RAC Node 2
CDB
PDB$
SEED
PDB1
Instance CDB2Instance CDB1
PDB$SEED Instance ID 1 PDB$SEED Instance ID 2
PDB1
Instance ID 1
PDB1
Instance ID 2
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
RAC Node 1
RAC and PDBs
How Oracle Single/Multitenant will change a DBA's life 394
RAC Node 2
CDB
PDB$
SEED
PDB1
Instance CDB2Instance CDB1
PDB$SEED
Instance ID 1
PDB$SEED
Instance ID 2
PDB1
Instance ID 1
PDB1
Instance ID 2
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Backup & Recovery
 Backup and recovery with RMAN
– Entire CDB with all PDBs
– Just the CDB$ROOT only
– PDBs:
BACKUP DATABASE PLUS ARCHIVELOG;
RESTORE DATABASE;
RECOVER DATABASE;
BACKUP DATABASE ROOT;
RESTORE DATABASE ROOT;
RECOVER DATABASE ROOT;
BACKUP PLUGGABLE DATABASE sales, hr;
RESTORE PLUGGABLE DATABASE 'pdb$seed', sales, hr;
RECOVER PLUGGABLE DATABASE 'pdb$seed', sales, hr;
How Oracle Single/Multitenant will change a DBA's life 395
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Diagnosing Issues
 The alert.log isn't always a great help
?Happened in which PDB(s)?
How Oracle Single/Multitenant will change a DBA's life 396
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
APEX – Oracle Application Express
 Remove "common" APEX from the
CDB$ROOT container
– apxremov_con.sql
 Install APEX locally in PDBs only -
will ease your life a lot
– apexins.sql or apxrtins.sql
– Save upgrade downtime
– Unplug/plug without APEX version
conflicts
– More flexibility
 Different APEX versions
 No "common" APEX upgrade necessary
How Oracle Single/Multitenant will change a DBA's life 397
CDB$ROOT
No
APEX
PDB$
SEED
No APEXNo APEXNo APEX
APEX_040200 Schema
APEX_0
40200
APEX_0
40200
APEX_0
40200
APEX_0
40200
No
APEX
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Database Vault
 Database Vault must be enabled in CDB root
 Database Vault can be enabled/disabled separately in PDBs
– DBMS_MACADM.ENABLE_DV
– DBMS_MACADM.DISABLE_DV
– http://docs.oracle.com/database/121/DVADM/dvdisabl.htm#DVADM71063
 Each PDB can have its own local DV owner and DV account manager
 Security policies are enforced locally in each PDB
 Documentation:
– http://docs.oracle.com/database/121/DVADM/dvintro.htm#DVADM71131
How Oracle Single/Multitenant will change a DBA's life 398
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Separation
 Security concept delivers isolation by default
How Oracle Single/Multitenant will change a DBA's life 399
CDB$
ROOT
PDB$SEED
PDB1
APPL
DBA1
SYSC##ADM
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
AWR – Where are the AWR tables?
How Oracle Single/Multitenant will change a DBA's life 400
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
AWR – Automatic Workload Repository
 AWR data is stored in CDB$ROOT only
– But is is visible from within each PDB
– awrrpt.sql works on CDB and PDB level
– Unplug/plug of a PDB does not carry AWR data
 Find a full list of all management features (ASH, ADDM, Stats etc) in PDB/CDB here:
https://docs.oracle.com/database/121/ADMIN/cdb_admin.htm#BAJCBDJA
How Oracle Single/Multitenant will change a DBA's life 401
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
AWR Lite Snapshots
 MOS Note:1993045.1
Reducing AWR resource consumption using LITE mode snapshots
– Automatic snapshots
 _AWR_SNAPSHOT_LEVEL = BASIC | LITE | TYPICAL | ALL | BESTFIT
– On-demand snapshots
 SQL> exec dbms_workload_repository.create_snapshot('LITE');
 Introduced with Oracle Database 12.1.0.2
How Oracle Single/Multitenant will change a DBA's life 402
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Drop your PDB upon unplug
 If you miss this step:
– Information will be kept in the CDB$ROOT's dictionary
– Issues when you create/plugin another PDB with the same name
How Oracle Single/Multitenant will change a DBA's life 403
CDB1 – Oracle 12.1.0.1
PDB$
SEED
PDB1
PDB1
xml
PDB1
alter pluggable
database PDB1 close;
alter pluggable
database PDB1 unplug
into '/stage/pdb1.xml';
drop pluggable database
PDB1 keep datafiles;
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Plugin Compatibility Check
 Not always as helpful as intended
– COMPATIBLE  NO ?!?
How Oracle Single/Multitenant will change a DBA's life 404
CDB
PDB$
SEED
PDB1
PDB1
xml
PDB1
SET SERVEROUTPUT ON
DECLARE
compatible CONSTANT VARCHAR2(3) :=
CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(
pdb_descr_file => '/data/pdb1.xml',
pdb_name => PDB1')
WHEN TRUE THEN 'YES' ELSE 'NO'
END;
BEGIN
DBMS_OUTPUT.PUT_LINE(compatible);
END;
/
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
PDB_PLUG_IN_VIOLATIONS
 Issues before or after plugin
– PDB_PLUG_IN_VIOLATIONS doesn't get purged
– Some useless entries
How Oracle Single/Multitenant will change a DBA's life 405
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
PDB$SEED's objects/files excluded by default
 exclude_seed_cdb_view=TRUE
 No worries – RMAN does it correct!
 exclude_seed_cdb_view=FALSE
How Oracle Single/Multitenant will change a DBA's life 406
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Not supported yet with Oracle Multitenant
 Flashback Pluggable Database
– Flashback Database works but will
flashback CDB$ROOT including all PDBs
 Oracle Streams
 Heat Map
 Automatic Data Optimization
 BEQ connection to a PDB
 DBVERIFY
 Data Recovery Advisor (DRA)

 Database Change Notification
 Continuous Query Notification (CQN)
 Client Side Cache
 Flashback Transaction Backout
How Oracle Single/Multitenant will change a DBA's life 407
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 408
Plug into Oracle Multitenant
Upgrade, Migrate & Consolidate to Oracle Database 12c
1
2
3
4
Overview
Plug in
Upgrade
Working
Reality5
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Stand Alone
Real World Customer Experience
 @Oracle – Production Environment
CDB with 2 PDBs
CDB
PDB$
SEED
PDB1DB1
CDB with 16 PDBs and Physical Standby plus EM
CDB
PDB$
SEED
PDB1 PDB3 PDB16...PDB2 PDB2
SWITCHOVER
Upgrade, Migrate & Consolidate to Oracle Database 12c 409
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Customer Experience
 Consolidation planning factors
– IO
– CPU
– Memory usage
– Redo rate
 http://www.oracle.com/technetwork/database/multitenant/
learn-more/oraclemultitenantt5-8-final-2185108.pdf
Upgrade, Migrate & Consolidate to Oracle Database 12c 410
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Customer Experience
"It is very stable"
"Issues may get to
you now at once"
"If seen as 15 different
databases I don't think I
would have configured them
on this cluster. But as
deployment of 15 PDBs within
one container it has been
made possible"
"A bit more work regarding
monitoring but a lot of
improvements"
" I am definitely impressed
with the quality and
stability side"
" If we talk about
whether a DBA's
life is much easier
I think its a mixed
bag"
Upgrade, Migrate & Consolidate to Oracle Database 12c 411
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
412Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
8
Character Set
Conversion
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion
 DMU – Data Migration Assistant for Unicode
– Installed in every $ORACLE_HOME since Oracle 11.2.0.4
– Supports migrations in place to AL32UTF8 and UTF8 charactersets only
– http://www.oracle.com/technetwork/database/database-
technologies/globalization/dmu/overview/index.html
– Documentation:
Upgrade, Migrate & Consolidate to Oracle Database 12c 413
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 Before you start: $ chmod +x dmu.sh
Upgrade, Migrate & Consolidate to Oracle Database 12c 414
$ cd $ORACLE_HOME/dmu
[UPGR] oracle@localhost:/u01/app/oracle/product/12.1.0.2/dmu
$ ls -lrt
total 132
-rw-r--r-- 1 oracle oinstall 53 Jul 19 2012 dmu.sh
-rw-r--r-- 1 oracle oinstall 18432 Dec 23 2012 dmuW64.exe
-rw-r--r-- 1 oracle oinstall 32768 Dec 23 2012 dmuW32.exe
-rw-r--r-- 1 oracle oinstall 18432 Dec 23 2012 dmu64.exe
-rw-r--r-- 1 oracle oinstall 32768 Dec 23 2012 dmu32.exe
drwxr-xr-x 3 oracle oinstall 4096 Jul 21 2014 sleepycat
drwxr-xr-x 7 oracle oinstall 4096 Jul 21 2014 ide
drwxr-xr-x 9 oracle oinstall 4096 Jul 21 2014 dmu
drwxr-xr-x 2 oracle oinstall 4096 Jul 21 2014 timingframework
drwxr-xr-x 8 oracle oinstall 4096 Jul 21 2014 modules
drwxr-xr-x 2 oracle oinstall 4096 Jul 21 2014 jlib
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 Check for a newer version of DMU:
Upgrade, Migrate & Consolidate to Oracle Database 12c 415
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 Define connections:  Repository Configuration Wizard:
Upgrade, Migrate & Consolidate to Oracle Database 12c 416
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 Choose target character set:  Choose repository tablespace:
Upgrade, Migrate & Consolidate to Oracle Database 12c 417
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 418
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 419
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 420
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 421
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 422
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 423
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 424
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
Upgrade, Migrate & Consolidate to Oracle Database 12c 425
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 Scan Wizard will be called again:  Execute pre-conversion tasks:
Upgrade, Migrate & Consolidate to Oracle Database 12c 426
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Character Set Conversion - DMU
 SQL generation:  Done!
Upgrade, Migrate & Consolidate to Oracle Database 12c 427
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
428Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Into the Cloud9
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Requirements
 Oracle Cloud (DBaaS) Account
 Local database (on premise)
Upgrade, Migrate & Consolidate to Oracle Database 12c 429
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Environment in the DBaaS Cloud
 Choose your service:
Upgrade, Migrate & Consolidate to Oracle Database 12c 430
PDB
VM only – plus tarball
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Environment in the DBaaS Cloud
 Connect to your database
Upgrade, Migrate & Consolidate to Oracle Database 12c 431
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Migration Options
Into the Oracle Cloud
Upgrade, Migrate & Consolidate to Oracle Database 12c 432
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Migration to the Oracle Database Cloud Service
 You'll get:
– 1 container database
– 1 pluggable database
 You'll have to do:
– Just start ...
Upgrade, Migrate & Consolidate to Oracle Database 12c 433
CDB
PDB$
SEED
PDB1 PDB2 PDBn
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Migration to the Oracle Database Cloud Service – VM Image
 You'll get:
– A virtual machine
– A tar ball containing the Oracle database software
 You'll have to:
– Unpack the tar ball
– Install Oracle Database 12.1.0.2
– Patch Oracle Database 12.1.0.2
– Create your database(s)
Upgrade, Migrate & Consolidate to Oracle Database 12c 434
CDB
PDB$
SEED
PDB1 PDB2 PDBn
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Pump – Conventional Export/Import
 expdp
 Transfer dump file into the cloud
 impdp
 NETWORK_LINK an option
– Tunnel sqlnet over ssh
 Works:
– Cross versions
– Cross OS platforms
– Cross character sets
 Migration
Upgrade, Migrate & Consolidate to Oracle Database 12c 435
SFTP / ssh
expdp
impdp
Dump
File
Dump
File
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Transportable Tablespaces
 expdp meta information
 Transfer into the cloud:
– Tablespace files
– Meta dump files
 impdp meta information
 Works:
– Cross versions
– Cross OS platforms (convert!)
 Potential character set migration
required upfront
 Migration
Upgrade, Migrate & Consolidate to Oracle Database 12c 436
SFTP / ssh
expdp
impdp
Meta
TS1
TS2
TS1
TS2
Meta
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Full Transportable Export/Import
 expdp meta information
 Transfer into the cloud:
– Tablespace files
– Dump file
 NETWORK_LINK an option
 impdp one-command migration
 Works:
– Cross versions with ≥11.2.0.3
– Cross OS platforms (convert!)
 Character set must match
 Migration
Upgrade, Migrate & Consolidate to Oracle Database 12c 437
SFTP / ssh
expdp
impdp
Full
Export
Dump
TS1
TS2
TS1
TS2Full
Export
Dump
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Guard as Transport Vehicle
 Transfer into the cloud:
– RMAN backup
 DUPLICATE FOR STANDBY FROM ACTIVE
DATABASE is an option
 Works:
– Little Endian OS platforms
– Same version
– Stand-alone/stand-alone or PDB/PDB
 DR to cloud using (Active) Data Guard
 Migration
Upgrade, Migrate & Consolidate to Oracle Database 12c 438
SFTP / ssh
Backup
Backup
Redo
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Managing Mixed Environments
 Enterprise Manager Hybrid Cloud Control
– https://docs.oracle.com/cd/E24628_01/doc.121/e24473/hybrid-cloud.htm#EMADM15141
Upgrade, Migrate & Consolidate to Oracle Database 12c 439
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
440Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback Strategy – Strategy
 Never start an upgrade or migration without evaluating and testing your
options for going back ...
 Complete RMAN Online Backup is always a must
 Clarify:
– Fallback requirements in minutes/hours/days
– How to deal with issues happening during the upgrade
– How to deal with issues hours/days after the upgrade
– Will you get additional downtime to change COMPATIBLE?
441Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter COMPATIBLE
 Minimum COMPATIBLE in Oracle Database 12c: 11.0.0
– 11.0.0 and 11.1.0 are equivalent
– Recommendation:
 Change it 7-10 days after upgrade – but restart required
– SQL>
– COMPATIBLE can't be turned back
alter system set compatible='12.1.0' scope=spfile;
COMPATIBLE must be increased to ≥11.0.0
Downgrade possible
COMPATIBLE can remain on 11.x.y
442Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback Strategy - Issues during upgrade
ALWAYS take a complete ONLINE backup with RMAN
NoYes
Change COMPATIBLE parameter?
Partial
OFFLINE
Backup
≥ 11.0
Guaranteed
Restore Point
Full restore and
recovery Flashback to GRPPartial Restore
Yes
Full
ONLINE
Backup
443Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Online Backup
 Restore a backup
– Complete online backup (RMAN)
– Please verify:
 Where is your backup located? Tapes, HD, off site...
 Does the restore work?
 How long will the restore take?
 How long will the recovery take?
– Recommendation:
 Have a valid online backup in any case – and test it!!!
444Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Offline Backup
 Restore a partial offline backup
– Put all data tablespaces in read-only mode
 That's downtime!
– Shutdown the database IMMEDIATE
– Copy SYSTEM, UNDO, TOOLS, SYSAUX, XDB, DRSYS and ODM data files plus control files
and redo logs
– In case of failure:
 Shutdown and copy all partial backup files back
 Startup in the old environment and recreate TEMP
– Advantages:
 Fast and simple, even COMPATIBLE can be changed
445Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Restore Point
 Flashback to a guaranteed restore point
– COMPATIBLE cannot be changed
Pre Upgrade Environment Post Upgrade Environment
CREATE RESTORE POINT grpt
GUARANTEE FLASHBACK DATABASE;
SHUTDOWN IMMEDIATE
STARTUP MOUNT;
FLASHBACK DATABASE TO RESTORE POINT grpt;
SHUTDOWN IMMEDIATE
STARTUP MOUNT;
ALTER DATABASE OPEN RESETLOGS;
DROP RESTORE POINT grpt;
UPGRADE
446Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback Strategy – Issues after upgrade
AGAIN take a complete ONLINE backup with RMAN after the
upgrade
NoYes
Change COMPATIBLE parameter?
≥ 11.1
Oracle
GoldenGate Downgrade
Data Pump
Re-Import
Yes
447Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Data Pump
 Downgrade with expdp/impdp to 10.x
– MOS Note:553337.1
– Prepare an empty database for the import “just in case”
– Then:
– Run expdp from the 12.1 database home with the VERSION parameter equal to the target
database COMPATIBLE setting
– Import using impdp from the target database home
– NETWORK_LINK can be used for downgrades as well
–
448Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: GoldenGate
 Downgrade with Oracle GoldenGate
– Version/platform independent
Source
1
2
“Downgrade”
Upgraded
destination
database
449Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Downgrade
 Downgrade with catdwgrd.sql
– Upgrade Guide – Downgrading a database to an earlier release:
https://docs.oracle.com/database/121/UPGRD/downgrade.htm#UPGRD007
– MOS Note:1516622.1:
How to Downgrade Oracle Database 12c Release 1 (12.1) to Previous Versions
 Special actions required for DV, OLS and other things – please see the note and the documentation
– Downgrade possible to:
 Oracle 11.1.0.7
 Oracle 11.2.0.x
– Do not change COMPATIBLE
450Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Fallback: Downgrade
 Basic steps to downgrade with catdwgrd.sql
– In Oracle Database 12c environment:
– In Oracle Database 11g environment:
SQL> SPOOL /tmp/downgrade.log
SQL> STARTUP DOWNGRADE
SQL> @catdwgrd.sql
SQL> SHUTDOWN IMMEDIATE
SQL> SPOOL OFF
SQL> STARTUP UPGRADE
SQL> SPOOL /tmp/reload.log
SQL> @catrelod.sql
SQL> SPOOL OFF
451Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
452Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Database 12c New Features Guide
 http://docs.oracle.com/cd/E16655_01/server.121/e17906/toc.htm
Upgrade, Migrate & Consolidate to Oracle Database 12c 453
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Database 12c Interactive Quick Reference
 http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/poster/OUTPUT_poster/poster.html#
Upgrade, Migrate & Consolidate to Oracle Database 12c 454
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
455Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Simplifying the life cycle of data
 An in-memory heat map tracks block and segment access
– Data is periodically written to disk
– Information is accessible by views or stored procedures
 Users can attach policies to tables to compress or tier data
based on access to data
– Tables or Partitions can be moved between compression levels
whilst data is still being accessed
 New feature of the Advanced Compression Option
Policy 1
456Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Add compression and tiering policies to tables
Oldest Data Most Recent Data
Policy 1
Policy 2
Compress Partitions with
row compression
if they haven’t been modified
in 30 days
Compress Partitions with
Hybrid columnar compression
if they haven’t been modified
in 180 days
457Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
A heat map tracks the activity of segments and blocks
Oldest Data Most Recent Data
Policy 1
Policy 2
458Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Policies are automatically applied to tables
Oldest Data Most Recent Data
Policy 1
Policy 2
459Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Policies are automatically applied to tables
Oldest Data Most Recent Data
Policy 1
Policy 2
460Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Policies are automatically applied to tables
Oldest Data Most Recent Data
Policy 1
Policy 2
461Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Reduce storage footprint, read compressed data faster
Oldest Data Most Recent Data
Policy 1
Policy 2
462Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic Data Optimization
Automatically tier data to lower cost storage
Oldest Data
Most Recent Data
Policy 1
Policy 2
Policy 3
If the tablespace is nearly full
compress the oldest partition
with archive compression and
move it to Tier 2 Storage
463Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
464Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Zero Data Loss Challenge
Trade-off between Zero Data Loss and Performance
The longer the distance, the larger the performance impact
Primary Standby
Commit
Commit Ack
Network Send
Network Ack
465Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Active Data Guard Far Sync
Standby between continents with zero data loss
Primary Standby
Far Sync
Instance
(Active)
Far Sync
Instance
(Idle)
New York
Bridgeport
Reading
London
sync
async
466Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle ASM 12c – Overview
 Oracle ASM 12c Standard Deployment
ASM Cluster Pool of Storage
Disk Group BDisk Group AShared Disk Groups
Wide File Striping
One to One
Mapping of ASM
Instances to
Servers
ASM Instance
Database Instance
ASM Disk
RAC Cluster
Node4Node3Node2Node1 Node5
ASM ASM ASM ASM ASM
ASM Instance
Database Instance
DBA DBA DBCDBB DBBDBB
Upgrade, Migrate & Consolidate to Oracle Database 12c 467
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Introducing Oracle Flex ASM
 Removal of One to One Mapping and HA
ASM Cluster Pool of Storage
Disk Group BDisk Group AShared Disk Groups
Wide File Striping
Databases share
ASM instances
ASM Instance
Database Instance
ASM Disk
RAC Cluster
Node5Node4Node3Node2Node1
Node5 runs
as ASM
Client to
Node4
Node1 runs
as ASM
Client to
Node2
Node1 runs
as ASM
Client to
Node4
Node2 runs
as ASM
Client to
Node3
ASM ASM ASM
ASM Instance
DBA DBA DBCDBB DBBDBB
Upgrade, Migrate & Consolidate to Oracle Database 12c 468
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
1 0 1
0 1 0 1 0
1 1 1 0 1 0 0 1
1 0 1 1 0 1 1 1 1 0
0 0 1 0 1 0 0 0 0
1 0 0 1 1 0 1
1 0 1 0
0 1
Fine-grained Table Recovery From Backup
 Simple RECOVER TABLE command to
recover one or more tables (most recent
or older version) from an RMAN backup
 Eliminates time and complexity associated
with manual restore, recover & export
RMAN
Backups
Upgrade, Migrate & Consolidate to Oracle Database 12c 469
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
470Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Soc. Sec. #
115-69-3428
DOB
11/06/71
PIN
5623
Policy
enforced redaction
of sensitive data
Redacting Sensitive Data
Mask Application Data Dynamically
Call Center
Operator
Payroll
Processing
Call Centers
Decision Support Systems
Systems with PII, PHI, PCI data
471Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Real-time sensitive data redaction
based on database session context
 Library of redaction policies and
point-and-click policy definition
 Consistent enforcement, policies
applied to data
 Transparent
 Backported to Oracle 11.2.0.4
Oracle Advanced Security
Redaction of Sensitive Data Displayed
Preventive Control for Oracle Database 12c
Credit Card Numbers
4451-2172-9841-4368
5106-8395-2095-5938
7830-0032-0294-1827
Redaction Policy
xxxx-xxxx-xxxx-4368 4451-2172-9841-4368
Billing
Department
Call Center
Application
Upgrade, Migrate & Consolidate to Oracle Database 12c 472
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Turn on privilege capture mode
– DBMS_PRIVILEGE_CAPTURE
 Report on actual privileges and roles
used in the database
 Helps revoke unnecessary privileges
 Enforce least privilege and reduce
risks
– Part of Oracle Database Vault license
Oracle Database 12c EE
Discover Use of Privileges and Roles
Administrative Control for Oracle Database 12c
Privilege Analysis
Create…
Drop…
Modify…
DBA role
APPADMIN role
Upgrade, Migrate & Consolidate to Oracle Database 12c 473
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Data Masking
Securely Provisioning Test Systems
 Mask At-Source
 Minimize sensitive data exposure
010010110010101001001001001001001001001001001000100101
010010010010011100100100100100100100001001001011100100
101010010010101010011010100101010010
Subsetted & Masked
Data Pump File
12.1
Prod Test
At-Source Masking
 Production data subsetted first
 Sensitive data masked separately
01001011001010100100100100100100100100100100100010010
10100100100100111001001001001001001000010010010111001
00101010010010101010011010100101010010
Prod
Data Subset Clone &Mask
11.2
Test
474Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
No longer part of ASO anymore!
 Network encryption
– Native and SLS/TLS
 Strong authentication services
– Kerberos, PKI and RADIUS
 Available in all licensed editions of all supported releases
Upgrade, Migrate & Consolidate to Oracle Database 12c 475
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
476Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Adaptive Execution Plans
HJ
Table scan
T2
Table scan
T1
NL
Index Scan
T2
Threshold exceeded, plan switches
Table scan
T1
HJ
Table scan
T2
 Plan decision deferred until
runtime
 Final decision is based on
statistics collected during
execution
 If statistics prove to be out of
range, sub-plans can be swapped
 Bad effects of skew eliminated
 _optimizer_adaptive_plans
Upgrade, Migrate & Consolidate to Oracle Database 12c 477
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Statistic Enhancements with Oracle Database 12c
 New types of histograms
– Top Frequency and Hybrid
 Online statistics gathering
– Statistics gathered as part of CTAS or IAS commands
 Session level statistics for GTTs
– Private statistics for GTT on per session basis - GLOBAL_TEMP_TABLE_STATS is SESSION per default
 Enhanced incremental statistics
 Automatic detection of column groups
 Statistic gathering reporting
Upgrade, Migrate & Consolidate to Oracle Database 12c 478
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Simplified Analysis of Big Data
Pattern Matching
Select * from
Ticker MATCH_RECOGNIZE (
…
PATTERN(X+ Y+ W+ Z+)
DEFINE X AS (price < PREV(price)),
Y AS (price > PREV(price)),
W AS (price < PREV(price)),
Z AS (price > PREV(price)
…
)
 Scalable discovery of business event sequences
– Clickstream logs: sessionization, search behaviour
– Financial transactions: fraud detection, double bottom
(“W”) stock analysis
– Telco: dropped calls
– Medical sensors: automated medical observations and
detections
AscendingOrder
“W” event defined
as regular expression
Upgrade, Migrate & Consolidate to Oracle Database 12c 479
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
next = lineNext.getQuantity();
}
if (!q.isEmpty() && (prev.isEmpty() || (eq(q, prev) && gt(q, next)))) {
state = "S";
return state;
}
if (gt(q, prev) && gt(q, next)) {
state = "T";
return state;
}
if (lt(q, prev) && lt(q, next)) {
state = "B";
return state;
}
if (!q.isEmpty() && (next.isEmpty() || (gt(q, prev) && eq(q, next)))) {
state = "E";
return state;
}
if (q.isEmpty() || eq(q, prev)) {
state = "F";
return state;
}
return state;
}
private boolean eq(String a, String b) {
if (a.isEmpty() || b.isEmpty()) {
return false;
}
return a.equals(b);
}
private boolean gt(String a, String b) {
if (a.isEmpty() || b.isEmpty()) {
return false;
}
return Double.parseDouble(a) > Double.parseDouble(b);
}
private boolean lt(String a, String b) {
if (a.isEmpty() || b.isEmpty()) {
return false;
}
return Double.parseDouble(a) < Double.parseDouble(b);
}
public String getState() {
return this.state;
}
}
BagFactory bagFactory = BagFactory.getInstance();
@Override
public Tuple exec(Tuple input) throws IOException {
long c = 0;
String line = "";
String pbkey = "";
V0Line nextLine;
V0Line thisLine;
V0Line processLine;
V0Line evalLine = null;
V0Line prevLine;
boolean noMoreValues = false;
String matchList = "";
ArrayList<V0Line> lineFifo = new ArrayList<V0Line>();
boolean finished = false;
DataBag output = bagFactory.newDefaultBag();
if (input == null) {
return null;
}
if (input.size() == 0) {
return null;
}
Object o = input.get(0);
if (o == null) {
return null;
}
//Object o = input.get(0);
if (!(o instanceof DataBag)) {
int errCode = 2114;
Pattern Matching
Finding Double Bottom (W)
SELECT first_x, last_z
FROM ticker MATCH_RECOGNIZE (
PARTITION BY name ORDER BY time
MEASURES FIRST(x.time) AS first_x,
LAST(z.time) AS last_z
ONE ROW PER MATCH
PATTERN (X+ Y+ W+ Z+)
DEFINE X AS (price < PREV(price)),
Y AS (price > PREV(price)),
W AS (price < PREV(price)),
Z AS (price > PREV(price) AND
z.time - FIRST(x.time) <= 7 ))
250+ Lines of Java and PIG 12 Lines of SQL
20x less code, 5x faster
Upgrade, Migrate & Consolidate to Oracle Database 12c 480
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Optimizer with Oracle Database 12c
 What to expect from the Optimizer in Oracle Database 12c
– http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-
optimizer-with-oracledb-12c-1963236.pdf
Upgrade, Migrate & Consolidate to Oracle Database 12c 481
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Various 12c optimizer parameters
 Please test carefully:
• _optimizer_adaptive_plans
• _optimizer_use_feedback
• _optimizer_adaptive_cursor_sharing
• Please disable:
• _optimizer_aggr_groupby_elim
• _optimizer_unnest_scalar_sq
• _rowsets_enabled
• _optimizer_reduce_groupby_key
Upgrade, Migrate & Consolidate to Oracle Database 12c 482
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
483Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Online Move of Datafiles
 Rename or relocate datafiles online [EE Feature]
– Move from one type of storage to another, or into ASM
– Examples:
 Rename:
 Relocate:
 Copy:
ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO
'/data/user001.dbf';
ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO
'/test/user1.dbf';
ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO
'/test/user1.dbf' KEEP;
Upgrade, Migrate & Consolidate to Oracle Database 12c 484
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
IDENTITY
 Example:
CREATE TABLE t1
(id NUMBER GENERATED AS IDENTITY,
first_name varchar2(30));
INSERT INTO t1(first_name) values ('Hugo');
ID FIRST_NAME
----- ------------
1 Hugo
CREATE TABLE t2
(id NUMBER GENERATED BY DEFAULT AS IDENTITY
(START WITH 100 INCREMENT BY 10),
first_name varchar2(30));
Create a table where the id column is always populated by Oracle
Create a table where the id column is populated by Oracle when not provided
Upgrade, Migrate & Consolidate to Oracle Database 12c 485
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Row Limit
 Example:
SELECT employee_id, last_name
FROM employees
ORDER BY employee_id
FETCH FIRST 5 ROWS ONLY;
SELECT employee_id, last_name, salary
FROM employees
ORDER BY salary
FETCH FIRST 5 PERCENT ROWS WITH TIES;
Select only the first 5 rows
Select the first 5% of rows and those whose salary “ties” with the lowest of the 5%
Upgrade, Migrate & Consolidate to Oracle Database 12c 486
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
32K VARCHAR2 / NVARCHAR2
 Example:
ALTER SYSTEM set MAX_STRING_SIZE=EXTENDED scope=SPFILE;
CREATE TABLE Applicants
(id NUMBER GENERATED AS IDENTITY,
first_name varchar2(30),
last_name varchar2(30),
application date,
CV varchar2(32767)
);
Enable 32k support in the Oracle Database 12c
Create table with 32k varchar2
SHUTDOWN IMMEDIATE
STARTUP UPGRADE
@?/rdbms/admin/utl32k.sql
Upgrade, Migrate & Consolidate to Oracle Database 12c 487
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enterprise Manager Express
Upgrade, Migrate & Consolidate to Oracle Database 12c 488
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enterprise Manager Express
 Manual configuration of the HTTP port for EM Express
– In init.ora/spfile (default setting):
 dispatchers=(PROTOCOL=TCP)(SERVICE=sample XDB)
– Check on which port EM Express is configured:
 SQL> select DBMS_XDB_CONFIG.getHTTPport() from dual;
– SQL> select DBMS_XDB_CONFIG.getHTTPSport() from dual;
– Set a new port:
 SQL> exec DBMS_XDB_CONFIG.setHTTPport(5500);
– SQL> exec DBMS_XDB_CONFIG.setHTTPSport(8080);
– Now access the EM Express homepage in the browser:
 http://database-hostname:port/em
– http://localhost:5500/em
– The configuration will have to be done for the CDB and every single PDB on different ports
Upgrade, Migrate & Consolidate to Oracle Database 12c 489
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enterprise Manager Cloud Control 12c
 Discovered Oracle Database 12c targets:
Upgrade, Migrate & Consolidate to Oracle Database 12c 490
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Enterprise Manager Cloud Control 12c
 Plug-in "Enterprise Manager For Oracle Database (DB) 12.1.0.4" already
released via EM Self-Update
– Supports Oracle Database 12.1.0.2
– Discovers CDBs and PDBs
Upgrade, Migrate & Consolidate to Oracle Database 12c 491
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Customer Reference
Neustar company profile
 Neustar is the first real-time provider of cloud-based information services and data
analytics, enabling marketing and IT security professionals to promote and protect their
businesses. With a commitment to privacy and neutrality, Neustar operates complex
data registries and uses its expertise to deliver actionable, data-driven insights that help
clients make high-value business decisions in real time, one customer interaction at a
time.
 Webcast about achieving ~300x performance gains with Oracle Spatial in Oracle
Database 12c is available here.
 More information is available at www.neustar.biz. Connect with Neustar
on Facebook, Twitter, and LinkedIn.
Upgrade, Migrate & Consolidate to Oracle Database 12c 492
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
ElementOne on 12c
Miscellaneous Features
 Reduction in redo/undo generation using global temporary tables resulting
in 1.7x performance boost
 2x performance gains with inline PL/SQL functions
 Up to 10x faster processing time with constructing large CLOBs / BLOBs
 Faster response times with cross session result set cache
Upgrade, Migrate & Consolidate to Oracle Database 12c 493
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
"Our experience with upgrade has been very positive,
upgrading to 12c, and we have been very impressed with
the robustness of 12c."
Nick Salem
Distinguished Engineer
Neustar, Inc.
Upgrade, Migrate & Consolidate to Oracle Database 12c 494
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automatic
Data Opti-
mization
Availability
SecurityOptimizer
Other
Enhance-
ments
In-
Memory
495Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Until Now Must Choose One Format and Suffer Tradeoffs
Optimizing Transaction and Query Performance
Row Format Databases versus Column Format Databases
Row
 Transactions run faster on row format
– Insert or query a sales order
– Fast processing few rows, many columns
Column
 Analytics run faster on column format
– Example : Report on sales totals by region
– Fast accessing few columns, many rows
SALES
SALES
496Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Dual Format In-Memory Database
 BOTH row and column in-
memory formats for same table
 Simultaneously active and
transactionally consistent
 Analytics & reporting use new
in-memory Column format
 OLTP uses proven row format
497
Memory Memory
SALES SALES
Row
Format
Column
Format
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle In-Memory Columnar Technology
 Pure in-memory column format
 Not persistent, and no logging
 Quick to change data: fast OLTP
 2x to 20x compression
 Enabled at table/partition level
 Available on all hardware
platforms
498
SALES
Pure In-Memory Columnar
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Orders of Magnitude Faster Analytic Data Scans
499
VectorRegister
Load
multiple
region
values
Vector
Compare
all values
an 1 cycle
CPU
Memory
REGION
CA
CA
CA
CA
Example:
Find all sales
in region of CA
> 100x Faster
 Each CPU core scans local in-
memory columns
 Scans use super fast SIMD vector
instructions
 Originally designed for graphics
& science
 Billions of rows/sec scan rate per
CPU core
 Row format is millions/sec
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Joining and Combining Data Also Dramatically Faster
 Converts joins of data in multiple
tables into fast column scans
 Joins tables 10x faster
500
Example: Find total sales in outlet stores
SalesStores
StoreID
Amount
Type=Outlet
StoreID in
15, 38, 64
StoreID
Type
Sum
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Generates Reports Instantly
 Dynamically creates in-memory
report outline
 Then report outline filled-in
during fast fact scan
 Reports run much faster
without predefined cubes
501
Example: Report sales of footwear in outlet stores
Sales
Stores
Products
In-Memory
Report Outline
Footwear
Outlets
$
$$
$
$$$
Footwear
Sales
Outlets
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Complex OLTP is Slowed by Analytic Indexes
Table
1 – 3
OLTP
Indexes
10 – 20
Analytic
Indexes
502
Table
1 – 3
OLTP
Indexes
In-Memory
Column Store
Column Store Replaces Analytic Indexes
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle In-Memory: Simple to Implement
1. Configure Memory Capacity
inmemory_size = XXX GB
2. Configure tables or partitions to be in memory
alter table | partition … inmemory;
3. Hide - and later - drop analytic indexes to speed up OLTP
503Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle In-Memory: Simple to Implement
• INMEMORY_CLAUSE_DEFAULT
• INMEMORY_FORCE
• INMEMORY_MAX_POPULATE_SERVERS
• INMEMORY_QUERY
• INMEMORY_SIZE
• INMEMORY_TRICKLE_REPOPULATE_SERVERS_PERCENT
• OPTIMIZER_INMEMORY_AWARE
504Upgrade, Migrate & Consolidate to Oracle Database 12c
• Documentation:
http://docs.oracle.com/database/121/ADMIN/memory.htm#ADMIN14257
• White Paper:
http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory-
2245633.html
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle In-Memory Requires Zero Application Changes
Full Functionality - No restrictions on SQL
Fully Multitenant - No migration of data
Fully Compatible - All existing applications run unchanged
Uniquely Achieves All In-Memory Benefits With No Application Changes
505Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
“In terms of how easy the in-memory option was to use, it was
actually almost boring. It just worked - just turn it on, select the
tables, nothing else to do.”
Mark Rittman
Chief Technical Officer
Rittman Mead
Upgrade, Migrate & Consolidate to Oracle Database 12c 506
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Which tables/partitions? Oracle In-Memory Advisor
 Download the Advisor from
MOS Note: 1965343.1
 Install it in any 11.2.0.3 or
newer database
 Will create SQL scripts to read
tables/partitions into In-Mem
 Part of the Oracle Tuning Pack license
 Further Information on OTN:
http://www.oracle.com/technetwork/datab
ase/manageability/inmemory-advisor-
2412222.html
507
In-Memory Columnar Store
Upgrade, Migrate & Consolidate to Oracle Database 12c
In-Memory
Advisor
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
508Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance Checklist
 Adjust maintenance windows
 Configure statistics retention
 Configure incremental statistics
 Adjust memory and optimizer parameters
 Configure AWR, ASH and ADDM
 Preserve and transport execution plans
 General test guidelines
 Real Application Testing
 System Statistics
 Automatic Tuning Advisor
Prepare
Stability
Test
Optimize
 Enable Performance FeaturesFeatures
509Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Adjust default maintenance windows
– Check:
 Default:
– Weekday windows: 10pm to 2am (4 hours)
– Weekend windows: 6am to 2am (20 hours)
 Resource Manager is active
 Adjust windows
SQL> exec DBMS_SCHEDULER.SET_ATTRIBUTE(
'MONDAY_WINDOW','REPEAT_INTERVAL',
'freq=daily;byday=MON;byhour=05;byminute=0;
bysecond=0');
SQL> exec DBMS_SCHEDULER.SET_ATTRIBUTE(
'MONDAY_WINDOW','DURATION',numtodsinterval(2,'hour'));
SQL> select CLIENT_NAME, STATUS from DBA_AUTOTASK_CLIENT;
510Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Configure statistics history retention period
– Check space
usage:
– Check retention:
 Default: 31 days
– Adjust setting
 Example: 10 days
SQL> select SPACE_USAGE_KBYTES/1024
MB from V$SYSAUX_OCCUPANTS where
OCCUPANT_NAME='SM/OPTSTAT';
SQL> select
DBMS_STATS.GET_STATS_HISTORY_RETENTION from DUAL;
SQL> exec
DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(10);
511Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Configure incremental statistics collection
– Set for selected
partitioned tables only:
– Global setting:
 Not recommended
– Result:
 Faster statistics collection for partitioned tables
 Statistics will be generated for touched partitions only
– Stats for that table must be gathered with GRANULARITY parameter set to AUTO
– ESTIMATE_PERCENT must be set to AUTO_SAMPLE_SIZE
SQL> exec
DBMS_STATS.SET_TABLE_PREFS('SH','SALES'
,'INCREMENTAL','TRUE');
SQL> exec
DBMS_STATS.SET_GLOBAL_PREFS('INCREMENTAL','TRUE');
512Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Sysaux Tablespace
Things to do right after upgrade
 Incremental stats
Sales Table
May 22nd 2008
May 23rd 2008
May 18th 2008
May 19th 2008
May 20th 2008
May 21st 2008
Partition level stats are gathered & synopsis created

Global stats generated by aggregating partition
level statistics and synopsis
May 24th 2008
A new partition is added to
the table & data is loaded
Gather partition statistics for new partition

Retrieve synopsis for each of the other partitions from SYSAUX
Global stats generated by aggregating the original
partition synopsis with the new one
513Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 New in Oracle Database 12c
– Incremental stats work with partition exchange
– Define that "changed" partitions won't be eligible for new stats generation until …:
– … this stale percentage is reached:
 Default would be 10% - but only when enabled
514Upgrade, Migrate & Consolidate to Oracle Database 12c
SQL> exec
DBMS_STATS.SET_DATABASE_PREFS('INCREMENTAL_STALENESS','USE_STALE_PERCENT');
SQL> exec DBMS_STATS.SET_DATABASE_PREFS('STALE_PERCENT','12');
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 DBMS_STATS.REPORT_STATS_OPERATIONS
515Upgrade, Migrate & Consolidate to Oracle Database 12c
variable mystatrep2 clob;
set long 1000000
begin
:mystatrep2 := DBMS_STATS.REPORT_STATS_OPERATIONS(since=>SYSTIMESTAMP-
1,until=>SYSTIMESTAMP, detail_level=>'TYPICAL',format=>'HTML');
end;
/
spool /tmp/stats.html
print mystatrep2
spool off
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 DBMS_STATS.REPORT_GATHER_SCHEMA_STATS
516Upgrade, Migrate & Consolidate to Oracle Database 12c
SET LINES 300 PAGES 0
SET LONG 1000000
COLUMN REPORT FORMAT A200
VARIABLE my_report CLOB;
BEGIN
:my_report := DBMS_STATS.REPORT_GATHER_SCHEMA_STATS(ownname => 'OE',
detail_level => 'TYPICAL', format => 'HTML');
END;
/
spool /tmp/stats.html
print mystatrep2
spool off
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Configure Automatic Shared Memory Management
– SGA_TARGET
 Set minimum values:
– If SGA resize by MMAN happens too frequently:
"_MEMORY_BROKER_STAT_INTERVAL"=900
Default is 30 (seconds)
– MEMORY_TARGET
 Set only for ASM and for
databases with constant load
DB_CACHE_SIZE
SHARED_POOL_SIZE
517Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Configure Automatic Shared Memory Management
– PGA_AGGREGATE_TARGET
 Check:
 Guidelines:
– PGA_AGGREGATE_LIMIT
 Values: integer [ K | M | G ]
 Default: >2GB and 200% of PGA_AGGREGATE_TARGET and 3MB x PROCESSES – it will not exceed
120% of physical memory – SGA size
 Setting it to 0 will mean "no limit"
OLTP: SGA=80% - PGA=20% of available memory
DSS: SGA=30% - PGA=70% of available memory
SQL> SELECT FROM V$PGASTAT;
518Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c 519
_RUN_EVERYTHING_FAST=TRUE
Values: { TRUE | MAYBE | IM_IN_A_BAD_MOOD | DON’T_CARE }
Explanation: Oracle runs always fast, doesn't it?
Recommendation: Tune your application, not only your database
Parameter Information Oracle 11.2/12c
Don't try this at home. This picture has been taken on a closed circuit
by an experienced German driver driving a decent German car 
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations Oracle 12.1.0.2
Upgrade, Migrate & Consolidate to Oracle Database 12c 520
_OPTIMIZER_AGGR_GROUPBY_ELIM
Values: { TRUE | FALSE }
Explanation: Optimizer can eliminate some GROUP BY operations if possible
Example:
SQL> explain plan for
2 select /*+ opt_param('_optimizer_aggr_groupby_elim',
'false')*/
3 dummy, sum(cnt)
4 from (select dummy,
5 count(*) cnt
6 from dualcopy
7 group by dummy)
8 group by dummy
9 ;
Explained
-----------------------------------------
| Id | Operation | Name |
-----------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | HASH GROUP BY | |
| 2 | VIEW | |
| 3 | HASH GROUP BY | |
| 4 | TABLE ACCESS FULL| DUALCOPY |
-----------------------------------------
SQL> explain plan for
2 select /*+
opt_param('_optimizer_aggr_groupby_elim', 'true')*/
3 dummy, sum(cnt)
4 from (select dummy,
5 count(*) cnt
6 from dualcopy
7 group by dummy)
8 group by dummy
9 ;
Explained
---------------------------------------
| Id | Operation | Name |
---------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | HASH GROUP BY | |
| 2 | TABLE ACCESS FULL| DUALCOPY |
---------------------------------------
Recommendation: FALSE - Wrong Results with GROUP BY Clause in Nested Query (Doc ID 19567916.8)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
_OPTIMIZER_COST_BASED_TRANSFORMATION
Values: { ON | OFF }
Explanation: See MOS Note: 1082127.1 for more details on CBQT
Annotation: Default is ON since Oracle Database 10.2
CBQT can add a high overhead at parse time but can yield considerable benefits by way of a better plan for the statement
Recommendation: Set it to OFF until 11.2.0.3
due to limited gain and some open issues. See MOS Note: 567354.1
521Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations Oracle 12.1.0.2
Upgrade, Migrate & Consolidate to Oracle Database 12c 522
INMEMORY_FORCE
Values: { DEFAULT | OFF }
Explanation: In-Memory Optimization
Recommendation: OFF – Unless you have an Oracle In-Memory license
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Recommendations
SESSION_CACHED_CURSORS
Default: 50
Explanation: Specifies the number of session cursors to cache.
More information in MOS Note: 30804.1
Annotation: Cursor caching mechanism was changed in Oracle 10.2.0.4
Recommendation: Set it to 200 and adjust the value later.
Use MOS SCRIPT: 208857.1 to adjust parameters
SESSION_CACHED_CURSORS and OPEN_CURSORS usage based.
Too high values may lead to fragmentation in shared pool
523Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
_MEMORY_IMM_MODE_WITHOUT_AUTOSGA
Values: { TRUE | FALSE }
Explanation: Switching this parameter to FALSE will prevent the SGA from
doing resize operations even though neither SGA_TARGET nor
MEMORY_TARGET are set.
Annotation: A generic enhancement in 11.2.0.1 was made to allow IMMEDIATE mode requests
even when SGA_TARGET (or MEMORY_TARGET) is not set. This enhancement
has been introduced to prevent ORA-4031 errors due to shared pool pressure
Recommendation: Just be aware of this change
To turn feature off:
alter system set "_memory_imm_mode_without_autosga"=FALSE;
Further information: MOS Note:1269139.1
524Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
OPTIMIZER_MODE
Values: { ALL_ROWS | FIRST_ROWS |
FIRST_ROWS_[1|10|100|1000]}
Explanation: Establishes the default behavior for choosing an optimization
approach for the instance
Annotation: Obsolete settings (will be ignored):
optimizer_mode=choose
optimizer_mode=rule
Only the /*+RULE */ hint will still work
Recommendation:
525Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2.0.4/12c
OPTIMIZER_DYNAMIC_SAMPLING
Values: { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 }
Explanation: If statistics are not available it controls whether dynamic stats will
be gathered, and the sample size
Annotation:  0: Off
 2: Check ≤64 blocks - generate stats during parse
 11: NEW SETTING
 Use dynamic statistics automatically when the Optimizer deems it
 Verifies cardinality and implements a time limit for the estimate
 Results persist as Shareable Statistics
 Different behavior between 11.2.0.4 and 12.1.0.x
Recommendation: See Oracle Database SQL Tuning Guide for details
526Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
Page248–SQLTuningGuide–OracleDatabase12c
OPTIMIZER_DYNAMIC_SAMPLING
527Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
OPTIMIZER_USE_PENDING_STATISTICS
Values: { FALSE | TRUE }
Explanation: Mitigate the risk of newly created object statistics
Object statistics persist through an upgrade
Recommendation: Switch on Pending Statistics:
SQL> exec DBMS_STATS.SET_GLOBAL_PREFS('PENDING','TRUE');
Gather new Oracle 12c statistics as "pending":
SQL> DBMS_STATS.GATHER_SCHEMA_STATS('SH');
Verify critical statements using pending 12c statistics:
SQL> alter session set optimizer_use_pending_statistics=TRUE;
Once everything is good publish them:
SQL> exec DBMS_STATS.PUBLISH_PENDING_STATS();
528Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
STATISTICS_LEVEL
Values: { TYPICAL | ALL | BASIC }
Explanation: Specifies the level of collection for database and operating system
statistics. The Oracle Database collects these statistics for a variety
of purposes, including making self-management decisions
Annotation: TYPICAL enables:
 Automatic SGA Tuning (SGA_TARGET)
 Automatic Statistics Collection
 Active Session History (ASH)
 DML Monitoring
Recommendation: Don't set it or set it explicitly to TYPICAL
529Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information Oracle 11.2/12c
CONTROL_MANAGEMENT_PACK_ACCESS
Values: { DIAGNOSTIC+TUNING | DIAGNOSTIC | NONE }
Explanation: Specifies which of the Server Manageability Packs should be
active
Annotation:  Default Enterprise Edition: DIAGNOSTIC+TUNING
 Default Standard Edition: NONE
Recommendation: Adjust it according to your license set
STATSPACK can still be used but has very limited functionality
 STATSPACK Guide : MOS Note:394937.1
 Turn of AWR/ASH in case you'll use STATSPACK
530Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to do right after upgrade
 Configure Automatic Workload Repository (AWR)
– Data gathered by MMON and stored in SYSAUX
– Check settings:
– Change settings:
 Example:
– Retention: 40 days (57600 min)
– Interval: 30 minutes
– Important scripts in ?/rdbms/admin:
SQL> exec
DBMS_WORKLOAD_REPOSITORY.MODIFY_
SNAPSHOT_SETTINGS(57600,30)
Size and trend: awrinfo.sql
AWR report SI: awrrpt.sql
AWR report RAC: awrrpti.sql
AWR report SQLID:awrsqrpt.sql
AWR diff report: awrgrrpt.sql
AWR extract: awrextr.sql
AWR load: awrload.sql
SQL> select * from DBA_HIST_WR_CONTROL;
531Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Configure AWR, ASH & ADDM
 Active Session History (ASH)
– Data gathered by MMNL
– View: V$ACTIVE_SESSION_HISTORY
– Space and time usage:
 Fixed size, circular buffer:
2MB x #CPUs (max. 5% SGA or <30MB)
 Designed to hold ~1 hour of statistics, may flush or fill sooner
 Further info: Note:243132.1
– Important scripts in ?/rdbms/admin:
– Needs to be increased
for Oracle Multitenant
ASH report (single instance): ashrpt.sql
AWR extract (RAC): ashrpti.sql
_ASH_SIZE
532Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Configure AWR, ASH & ADDM
 Real-Time ADDM
– Data gathered by MMON
 Every 3 sec without lock/latch
 Triggers real-time ADDM analysis
–Conditions:
– MMON slave process creates
report and stores it in AWR
 DBA_HIST_REPORTS
533Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance Checklist
534
 Adjust maintenance windows
 Configure statistics retention
 Configure incremental statistics
 Adjust memory and optimizer parameters
 Configure AWR, ASH and ADDM
 Preserve and transport execution plans
 General test guidelines
 Real Application Testing
 System Statistics
 Automatic Tuning Advisor
 Enable Performance Features
Prepare
Stability
Test
Optimize
Features
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Typical situation after a change
 Challenging to "freeze" execution plans
Parse Execute Plan acceptable
Parse Execute Plan possibly
not acceptable
Conditions change:
New statistics, parameter change, upgrade


535Upgrade, Migrate & Consolidate to Oracle Database 12c
GB
HJ
...HJ
GB
NL
...NL
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Rule Based Optimizer?
 Stored Outlines?
 Rewrite plans, tweak
parameters, hints …?
Strategies to enforce Plan Stability
Desupported - MOS Note:189702.1
Deprecated - Documentation
You have too much spare time?
SQL Plan Management
EE Feature - Package: DBMS_SPM
536Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Plan Management - Mechanism
 Phase 1 – Baseline Capture
– Set OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE
• If OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE then all found plans will be put into the baseline
537Upgrade, Migrate & Consolidate to Oracle Database 12c
Parse Execute Plan acceptable

GB
HJ
...HJ
2x
Plan History SQL MANAGEMENT BASE
Residing in SYSAUX TS.
Will occupy max. 10% of SYSAUX.
Weekly job will delete plans
not used since 53 weeks [default].
Before Oracle 12c a massive number of hints get stored –
since Oracle 12c entire plans will be kept
SQL Profiles
Initial plan
will be accepted
if repeated and
will be added to the
SQL Plan Baseline
Plan Baseline
GB
HJ
...HJ
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Plan Management - Mechanism
 Phase 2 - Selection
– Same statement parsed again but a different plan will be created
538Upgrade, Migrate & Consolidate to Oracle Database 12c
Parse Execute
Plan acceptable

GB
NL
...NL
2x
Plan History
Plan Baseline
GB
HJ
...HJ
New plan will be
added to the Plan History
but it won't be used
unless it has been verified
GB
NL
...NL
 OPTIMIZER_USE_SQL_PLAN_BASELINES=TRUE
 OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=FALSE
 Both switched to their defaults
 Annotation:
If OCSPB=TRUE then this plan would have been added to the baseline
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Plan Management - Mechanism
 Phase 3 - Evolution
– Since Oracle 12.1.0.2:
Optimizer
Equal or better plans
can be added to the
SQL Plan Baseline
539Upgrade, Migrate & Consolidate to Oracle Database 12c
New SYS_AUTO_SPM_EVOLVE_TASK
job as part of the Automatic SQL Tuning Task
Report: DBMS_SPM.REPORT_AUTO_EVOLVE_TASK
Manual: DBMS_SPM.CREATE_EVOLVE_TASK
Plan History
Plan Baseline
GB
HJ
...HJ
GB
NL
...NL
GB
NL
HJHJ
Plan History
Plan Baseline
GB
HJ
...HJ
GB
NL
...NL
GB
NL
HJHJ
Worse plans
will be kept
in the Plan
History and
will get purged
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Plan Management
 Configure SQL Plan Management (SPM)
– Check settings:
– Change retention:
 Default: 53 weeks
– Change space
consumption:
 Default: 10% of SYSAUX
 Plans will be stored in a LOB
– Sources to load
plans from:
SQL> exec
DBMS_SPM.CONFIGURE('plan_retention_weeks',5);
SQL> select PARAMETER_NAME, PARAMETER_VALUE
from DBA_SQL_MANAGEMENT_CONFIG;
SQL> exec
DBMS_SPM.CONFIGURE('space_budget_percent',5);
Load plans from AWR
into a SQL Tuning Set
540Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Stability using Stored Outlines

Capture query outlines
on production system
 Transfer query plans
into the Plan Baseline with
DBMS_SPM.MIGRATE_STORED_OUTLINE
Upgrade
541Upgrade, Migrate & Consolidate to Oracle Database 12c
Plan History
Plan Baseline
GB
HJ
...HJ
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Stability using Stored Outlines
 Upgrade scenario
– In Oracle 9i/10g:
 GRANT CREATE ANY OUTLINE TO APPUSER;
 ALTER SYSTEM set CREATE_STORED_OUTLINES=MYPLANS;
 Now run the statements you'd like to capture
 ALTER SYSTEM SET CREATE_STORED_OUTLINES=false;
 Check the category (should be MYPLANS):
SELECT name, sql_text, category FROM user_outlines;
– Upgrade to Oracle 12c
 variable repo clob;
exec :repo:=DBMS_SPM.MIGRATE_STORED_OUTLINE(
attribute_name=>'CATEGORY', attribute_value=>'MYPLANS');
542Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Stability using Plan Capture
STS

STS
 Plans will be taken
from STS and added
to the SQL Plan Baseline
DBMS_SPM.LOAD_PLANS_FROM_SQLSET
Upgrade
Load plans from AWR
into a SQL Tuning Set
543Upgrade, Migrate & Consolidate to Oracle Database 12c
Plan History
Plan Baseline
GB
HJ
...HJ
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Stability using Plan Capture
 Upgrade scenario example: Capturing from Cursor Cache
– BEGIN
SYS.DBMS_SQLTUNE.CREATE_SQLSET(
sqlset_name=>'SPM_STS',description=>'10.2 plans');
END;
/
DECLARE
stscur dbms_sqltune.sqlset_cursor;
BEGIN
OPEN stscur FOR
SELECT VALUE(P) FROM TABLE(dbms_sqltune.select_cursor_cache(
'parsing_schema_name<>''SYS''',null,null,null,null,1,null,'ALL')) P;
-->> Populate the SQL Tuning Set
dbms_sqltune.load_sqlset(sqlset_name=>'SPM_STS',populate_cursor=>stscur);
END;
/
SQL> variable cnt number
SQL> exec :cnt := DBMS_SPM.LOAD_PLANS_FROM_SQLSET(sqlset_name=>'SPM_STS');
544Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Transport
Exp/imp staging
table to target system
Staging
Table


DBMS_SPM.
CREATE_STGTAB_BASELINE
DBMS_SPM.
PACK_STGTAB_BASELINE
DBMS_SPM.
UNPACK_STGTAB_BASELINE
@Vendor @Customer

545Upgrade, Migrate & Consolidate to Oracle Database 12c
Plan History
Plan Baseline
GB
HJ
...HJ
Plan History
Plan Baseline
GB
HJ
...HJ
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SPM – Plan Transport
 Transporting SPM baselines between test and production databases
– @Test System:
 Create a staging table using DBMS_SPM.CREATE_STGTAB_BASELINE
 Pack the required baselines into the staging table using
DBMS_SPM.PACK_STGTAB_BASELINE
 Export the staging table into a dump file using Data Pump Export and transport it to the
destination system
– @Production System:
 Import the dump file into the destination database
 Unpack the SQL Plan Baselines from the staging table into the SQL Management Base of
the target system
– DBMS_SPM.UNPACK_STGTAB_BASELINE
546Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Plan Management
 White Paper:
– http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-
sql-plan-mgmt-12c-1963237.pdf
 MOS Notes:
– MOS Note:456518.1 SQL Plan Management – Example
– MOS Note:789888.1 How to load plans from AWR into SPM
– MOS Note:801033.1 How to move 10.2 plans into 11g SPM
547Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance Checklist
548
 Adjust maintenance windows
 Configure statistics retention
 Configure incremental statistics
 Adjust memory and optimizer parameters
 Configure AWR, ASH and ADDM
 Preserve and transport execution plans
 General test guidelines
 Real Application Testing
 System Statistics
 Automatic Tuning Advisor
 Enable Performance Features
Prepare
Stability
Test
Optimize
Features
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
General Test Guidelines
Upgrade/Migration Process
Post-Upgrade Functionality
Post-Upgrade Performance
ProdLoad
549Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Testing Effort
 Relation between test completeness and costs
Costslow high
Completeness0%100%
Upgrade, Migrate & Consolidate to Oracle Database 12c 550
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real Application Testing
 Record a workload and replay it
 Find plan regressions prior to a change
 Multitenant: MOS Note:1937920.1 – Setup/Run Replay in Multitenant
Real Application Testing
 Available since Oracle Database 11.1.0.6
 Available also with patch sets Oracle Database 10.2.0.4/5
SQL Performance
Analyzer (SPA)
DBMS_SPA
Gathering ≥ 9i
Evaluation ≥ 10.2.0.4
Database Replay
DBMS_WORKLOAD_CAPTURE
DBMS_WORKLOAD_REPLAY
Capture ≥ 9.2.0.8
Replay ≥ 11.1.0.7
551Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Replay
Database Replay
Migrate
R2
10.2.0.4 11.2.0.4
Capture Workload Replay Workload
Compare – then restore
and run again with changes
IBM AIX SOLARIS
Preprocess Workload
552Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Database Replay: Analysis & Reporting
 Error Divergence: For each call error divergence is reported
– New: Error encountered during replay not seen during capture
– Not Found: Error encountered during capture not seen during replay
– Mutated: Different error produced in replay than during capture
 Data Divergence
– Replay: Number of rows returned by each call are compared and divergences reported
– User: Application level validation scripts
 Performance Reporting
– Capture and Replay Report: Provides high-level performance information
– ADDM Report: Provides in-depth performance analysis
– AWR, ASH Report: Facilitates comparative or skew analysis
553Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Consolidated Database Replays
 Allows workload
captured on different
databases to be
consolidated for replay
 Works for manually
consolidated databases
or Pluggable Databases
Validating consolidation strategies
SALES
HR
ERP
CRM
Upgrade, Migrate & Consolidate to Oracle Database 12c 554
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Performance Analyzer
SQL Performance Analyzer
STS
Capture SQLs
into a STS
Load STS
STS
Evaluate, compare and tune –
over and over again!
Migrate
R2
10.2.0.4 12.1.0.2
IBM AIX SOLARIS
555Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Resulting Reports
 Example: Report showing regressed statements and plans
556Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 557
Hundreds of Databases
Using Real Application Testing
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Real World Checkpoint
 CSX
– One of the nation‘s leading transportation suppliers
 Encompasses 21,000 miles of tracks
in 23 states, from Florida to Ontario
 HQ in Jacksonville, Florida
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 558
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Upgrade and migration of 304 databases to 11.2.0.2 over a
24 month period (2011-2012)
– 1/3 production, 2/3 test and development systems
– Source versions: Oracle 10.2.0.4 and a few Oracle 8i/9i
– Single Instance on IBM AIX  RAC on Linux
 Plan to use Real Application Testing
– Guarantee quality and mitigate the risk of upgrading
 Define standards
– Install 11.2.0.2 and patches and apply latest PSU
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 559
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Limited downtime on some business critical systems
 Testing cycles vary from 1-6 months depending on
complexity and criticality
 Tight on available testing resources
– Time
– People
– Systems
 New to Real Application Testing
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 560
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Close alliance with Oracle's Upgrade Development Group and
Oracle's RAT Pack
– CSX agreed to become an official
Oracle Database 11.2 Reference Customer
 Monthly status meetings
 Onsite training
 Live upgrade and RAT demo
– Cloning databases methods for use with RAT
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 561
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Upgrade and migration methods used:
 Policy:
– Install Oracle SW with latest patches and PSU
– Combine HW refresh and OS upgrades
 Internal application to track owner, status, success
80%
20% Data Pump for OS Migration
DBUA for Upgrades
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 562
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 Yes –project took 2 years
– 88% of all databases upgraded within 18 months
– Some systems took longer due to business and/or resource
constraints
 Performance comparison mechanisms are very helpful
 Regressions found and fixed before upgrade
 RAT helped a lot to predict workload performance and
ensure careful testing
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 563
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 “The Real Application Testing tool provided a comprehensive
and flexible solution for assessing the impact of the Oracle
11g database upgrade into CSX systems. At CSX we were
able to capture real production workloads, replay it in the
11g environment, identify poor performing queries and,
fine tune these queries in a test environment before the
production implementation.“
Maritza Gonzalez, Technical Director
CSX Corporation
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 564
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
 More Information?
https://blogs.oracle.com/UPGRADE/entry/csx_corporation_upgrades_databases_2x
Real World Checkpoint
Customer
Project
Constraints
Preparation
Upgrade
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 565
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Use the Right Testing Tools
Upgrade, Migrate & Consolidate to Oracle Database 12c 566
Predictable
Upgrades
SQL Plan
Management
Database
Replay
SQL
Performance
Analyzer
SQL Tuning
Advisor
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Testing Tools – Hand-in-Hand
Upgrade, Migrate & Consolidate to Oracle Database 12c 567
Collect execution plans
before upgrade
Verify them with SQL
Performance Analyzer
Regressed plans?
SQL Plan Management
SQL Tuning Advisor
Verify functionality and
performance with
Database Replay
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance Checklist
568
 Adjust maintenance windows
 Configure statistics retention
 Configure incremental statistics
 Adjust memory and optimizer parameters
 Configure AWR, ASH and ADDM
 Preserve and transport execution plans
 General test guidelines
 Real Application Testing
 System Statistics
 Automatic Tuning Advisor
 Enable Performance Features
Prepare
Stability
Test
Optimize
Features
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Gather Workload Statistics
 Gather system
statistics during
a regular workload
period:
 Revert to the defaults:
SQL> select pname NAME, pval1 VALUE, pval2
INFO from AUX_STATS$;
NAME VALUE INFO
-------------------- ---------- ------------------------------
STATUS COMPLETED
DSTART 04-03-2011 12:30
DSTOP 05-03-2011 12:30
FLAGS 1
CPUSPEEDNW 2498,65
IOSEEKTIM 11,405
IOTFRSPEED 25595,605
...
SQL> exec
DBMS_STATS.GATHER_SYSTEM_STATS('start');
<< Run it for several hours on a workload – does not generate overhead!!! >>
SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('stop');
Best Practice°
°
°
°
SQL> exec
DBMS_STATS.DELETE_SYSTEM_STATS;
569Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Gather Workload Statistics
 Calibrate I/O (Orion): Example
– This is a requirement for AUTODOP (automatic degree of parallelism in 11.2.0.2) – in addition PARALLEL_DEGREE_POLICY must be set to AUTO
 Exadata:
SET SERVEROUTPUT ON
DECLARE lat INTEGER;
iops INTEGER;
mbps INTEGER;
BEGIN
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (28, 10, iops, mbps, lat);
DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
DBMS_OUTPUT.PUT_LINE ('latency = ' || lat);
DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps);
end;
/
INFO°
°
°
°
SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('EXADATA');
570Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Workload Stats: Further Information
 See the Oracle 11.2 Performance Tuning Guide for all stats:
– http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/stats.htm#PFGRF94743
– See also:
– 13.4.1.2 Multiblock Read Count
If you gather workload statistics, then the mbrc value gathered as part of the workload statistics is used to
estimate the cost of a full table scan. However, during the gathering process of workload statistics, Oracle
Database may not gather the mbrc and mreadtim values if no table scans are performed during serial
workloads, as is often the case with OLTP systems. However, full table scans occur frequently on DSS systems
but may run parallel and bypass the buffer cache. In such cases, Oracle Database still gathers the sreadtim
value because the database performs index lookup using the buffer cache.
– If Oracle Database cannot gather or validate gathered mbrc or mreadtim values, but has gathered
sreadtim and cpuspeed values, then the database uses only the sreadtim and cpuspeed values for
costing. In this case, the optimizer uses the value of the initialization parameter
DB_FILE_MULTIBLOCK_READ_COUNT to cost a full table scan.
However, if DB_FILE_MULTIBLOCK_READ_COUNT is not set or is set to 0 (zero), then the optimizer uses
a value of 8 for costing.
INFO
°
°
°
°
571Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Gather Workload Statistics
Oracle Database 10g/11g only
 Gather fixed objects statistics
during regular workload 1 week
after upgrade:
– Will gather stats on X$ structures
– Redo it 4x per year with a job
 Findings:
– MMON may cause too much CPU load if fixed objects stats haven't been generated
– Internal recursive queries perform better
 Not necessary anymore in Oracle Database 12c as it is included in the Auto Stats Gathering Job
:
SQL> exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
Best Practice°
°
°
°
572Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information
 _OPTIMIZER_IGNORE_HINTS
– Values: TRUE | FALSE
– SQL hints that worked in one release may not work in another
– Test all SQL statements with hints on the new release using the parameter
 Chances are high that SQL statements will perform better without any hints
573Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information
 OPTIMIZER_USE_INVISIBLE_INDEXES
– Values: TRUE | FALSE
– Background:
With modern IO systems full table scans might be more efficient than index lookups – but dropping
and recreating an index is expensive. By making an index invisible to the optimizer the effect on
query performance can be detected before it affects production users. This is extremely beneficial
in an Exadata environment.
– Example: ALTER INDEX idx_ename ON emp(ename) INVISIBLE;
ALTER SESSION SET
OPTIMIZER_USE_INVISIBLE_INDEXES=TRUE;
574Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Parameter Information
 CELL_OFFLOAD_PLAN_DISPLAY
– Values: TRUE | FALSE
– Background:
Will display you potential savings with a cell storage
– STORAGE indicates which parts of the query could be offloaded to the storage cells
using smart scan
– Example: -------------------------------------------
| Id | Operation | Name |
-------------------------------------------
| 0 | SELECT STATEMENT | |
| *1 | HASH JOIN | |
| *2 | HASH JOIN | |
| *3 | TABLE ACCESS STORAGE FULL | SALES |
| *4 | TABLE ACCESS STORAGE FULL | SALES |
| *5 | TABLE ACCESS STORAGE FULL | SALES |
575Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Real-Time Monitoring
 Only source of truth to monitor the real execution plan
– Part of Tuning Pack license
– MOS Note:1229904.1: Real-Time SQL Monitoring in 11g
– DBMS_SQLTUNE.REPORT_SQL_MONITOR() allows to display monitoring information
– SET AUTOTRACE TRACE does not show the "real" plan in some cases
– Target:
 Parallel queries, parallel DML or parallel DDL
 Execution that exceeds 5 sec of CPU or I/O time
– Global SQL level statistics are collected: V$SQL_MONITOR
– Plan level statistics are collected (#rows, memory, temp space, start/end date): V$SQL_PLAN_MONITOR
– Statistics are updated quasi real-time while the query executes
– Statistics for completed executions are retained for at least 5 minutes
– Feature switched on by default
576Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Manual vs Automatic SQL Tuning
Manual
SQL Tuning
• Complex
• Time consuming
• Never-ending task
Advisors
Since 10g - improved in 11g
SQL Tuning Advisor
• Can operate on a single SQL
• Optimizer in Comprehensive Mode
• Potential recommendations:
• SQL Profiles
• Indexes
SQL Access Advisor
• Requires a workload (+50 sql)
• Potential recommendations:
• Indexes
• Materialized Views
• Indexes on MVs
• Partitioning Advisor
Automatic
SQL Tuning
Since 11g
577Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Tuning Advisor
 Can be used in EM or on CLI (via DBMS_SQLTUNE)
– Part of Tuning Pack since Oracle 10g
– SQL Profiles contain information that lead to improved execution plans
without changing the application code
 Use different optimizer settings
 Correct wrong/missing statistics and wrong estimates
 SQL Profiles don’t change the original SQL statement
 SQL Profiles are persistent
 SQL Profiles can be transported within SQL Tuning Sets (STS)
– See Note:751068.1 for an example
 SQL Profiles can be tested and verified without any risk
578Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Tuning
 Example: Results of SQL Tuning Advisor  SQL Profile
 
579Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Tuning
 Example: Compare original to new explain plan


580Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Tuning Task Command Line Example
exec DBMS_SQLTUNE.DROP_TUNING_TASK('my_tuning_task');
DECLARE
my_task_name VARCHAR2(30);
my_sqltext CLOB;
BEGIN
my_sqltext := q'!<your SQL - concatenate lines with ||>!';
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_text => my_sqltext,
user_name => XY,scope => 'COMPREHENSIVE',time_limit => 60,
task_name => 'my_tuning_task', description => 'test');
END;
/
exec DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_tuning_task' );
SELECT sofar, totalwork FROM V$ADVISOR_PROGRESS WHERE task_id =
(SELECT task_id FROM USER_ADVISOR_TASKS WHERE task_name='my_tuning_task');
SET LONG 100000
SET LONGCHUNKSIZE 100000
SET LINESIZE 10000
SET PAGESIZE 10000
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_tuning_task') FROM DUAL;
581Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Profile containing literals - not binds
 SQL Profiles can handle statements containing literals (instead of binds) as
well:
– Since 11.1.0.6 possible in EM:
– In 10.2 only possible on command line:
SQL> select name, status, force_matching, sql_text rom dba_sql_profiles;
NAME STATUS FOR SQL_TEXT
------- -------- ---- --------------------------------------------
MY_PROF ENABLED YES select /*+ use_nl(c) ordered */ count(*)
from sh.sales s, sh.customers c
where c.cust_id = s.cust_id
and CUST_FIRST_NAME = 'Mike'
exec
:p_name:=dbms_sqltune.accept_sql_profile
(task_name=>'XT',name=>'XT_PROFILE', FORCE_MATCH=>TRUE);
582Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Profile - evaluation
 SQL Profiles should be evaluated before making them available to every user:
– Now evaluate the statement's profile in a limited user context
– If verification went fine, make it accessible to everybody
exec
:p_name:=dbms_sqltune.accept_sql_profile
task_name=>'XT',name=>'XT_PROFILE',
category=>'TEST_ENV', FORCE_MATCH=>TRUE)
alter session set SQLTUNE_CATEGORY='TEST_ENV';
exec
dbms_sqltune.alter_sql_profile
(name=>'XT_PROFILE',
attribute_name=>'CATEGORY',value=>'DEFAULT')
583Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SQL Tuning Automation in 11g
 Configure Automatic SQL Tuning
 Package: DBMS_AUTO_SQLTUNE
584Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
It’s Automatic!
Choose
Candidate
SQLone
week
SQL Tuning Automation since Oracle Database 11g
Workload
SQL Tuning
Candidates
Test SQL ProfilesImplement
SQL Profiles
Generate
Recommendations
AWR
DBA
View Reports /
Control
Process
585Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Deutsche Messe AG
– HQ in Hannover, Germany
– Largest trade fair worldwide
– Key trade fairs:
 CeBIT
 Hannover Messe
– ~1,000,000 m² exhibition space
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 586
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
 Upgrade of a 3-node Oracle 10.2.0.3 RAC Cluster to
Oracle 11.1.0.7
– Move from raw devices to ASM
– Use Snapshot Standby instead of RMAN to refresh development
databases
– Tune third-party application with Automatic SQL Tuning
– Sun Solaris 10
 Initially 2 databases to upgrade (each ~350GB):
– CeBIT system
– Online ordering web application
Real World Checkpoint
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 587
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Keep the old hardware
 The "worst" application ever ...
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 588
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Performance:
– AWR snapshots
– Automatic SQL Tuning showed excellent results
– Real Application Testing (Database Replay) done during high-load
phase during CeBIT 2009
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 589
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Upgrade
– Data Pump used for upgrade, consolidation and reorganization
– Everything went well ... until ...
 Right at the end of impdp run the cluster node went down and was restarted
 Reason: EM Agent was going amok and requested all available RAM and swap
until Clusterware cleaned up the situation by a restart
– Remedy: Upgrade the agents to the version matching your Grid Control !!!
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 590
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 Live? And alive?
– Yes! Go-live in September and October 2009
 But highest load to be expected in March 2010 (CeBIT!!)
– Overall downtime: 4 hrs
– Application is faster than ever
– Customer kept 3 year old hardware
– All SAP systems recently upgraded to 11.2.0.3
 More information: OOW 2010 presentation and Success Story
– http://apex.oracle.com/pls/apex/f?p=202202:2:::::P2_SUCHWORT:messe
– http://www.oracle.com/us/corporate/customers/deutsche-messe-1-db-snapshot-
367194.pdf
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 591
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Real World Checkpoint
 "Heal" a terrible application
Improvement factor:
~250,000x !!!
Customer
Project
Constraints
Preparation
Migration
Success?
Remarks
Upgrade, Migrate & Consolidate to Oracle Database 12c 592
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Performance Checklist
593
 Adjust maintenance windows
 Configure statistics retention
 Configure incremental statistics
 Adjust memory and optimizer parameters
 Configure AWR, ASH and ADDM
 Preserve and transport execution plans
 General test guidelines
 Real Application Testing
 System Statistics
 Automatic Tuning Advisor
 Enable Performance Features
Prepare
Stability
Test
Optimize
Features
Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
AUTODOP – Automatic Degree of Parallelism
 AUTODOP was introduced in Oracle 11.2.0.2
– Oracle 12c does not require I/O calibration anymore
 Default value of 200MB/sec IO rate will be used instead
– I/O calibration (Orion):
– Since Oracle 12c: IO and CPU taken into consideration
 11g: Only IO was used
– Enabled by setting init parameter:
SET SERVEROUTPUT ON
DECLARE lat INTEGER;
iops INTEGER;
mbps INTEGER;
BEGIN
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (84, 10, iops, mbps, lat);
DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops);
DBMS_OUTPUT.PUT_LINE ('latency = ' || lat);
DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps);
end;
/
SELECT * FROM DBA_RSRC_IO_CALIBRATE;
SQL> ALTER SESSION SET PARALLEL_DEGREE_POLICY=AUTO;
594Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Automated Degree of Parallelism
How it works
SQL
statement
Statement is hard parsed
And optimizer determines the
execution plan
Statement executes
serially
Statement executes in
parallel
Optimizer determines
ideal DOP
If estimated time greater
than threshold
Actual DOP = MIN(default DOP, ideal DOP)
If estimated time less
than threshold
PARALLEL_MIN_TIME_THRESHOLD
595Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Adaptive Cursor Sharing
 Adaptive cursor sharing introduced in 11g
 Common problem:
– When bind variables are used, the initial plan can be suboptimal due to the fact
that
 Future values used in future executions share the initial plan
 The first set of binds used may not be representative of the majority of
executions
– For explanation and examples see Note:740052.1 and Note:836256.1
 This feature monitors the execution statistics for candidates queries and makes it possible for
the same query to generate and use different execution plans for different set of binds values
 Parameter: _optimizer_adaptive_cursor_sharing=FALSE|TRUE
596Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
PL/SQL Native Compilation
 Since Oracle 11g it's easier, cheaper, faster
– No directory object needed: compiled library resides in database
– No external compiler required – no extra license costs!
– Can speed up PL/SQL performance (results may vary)
– Just two PL/SQL native compilation parameters to set:
 PLSQL_CODE_TYPE=NATIVE
 PLSQL_OPTIMIZE_LEVEL=3
– Then recompile the schemas:
 SQL> exec DBMS_UTILITY.COMPILE_SCHEMA('<username>');
597Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
SecureFiles
 SecureFiles = new LOB storage technology
– Better performance
– Additional features: deduplication, encryption
 Examples:
– Tablespace must be ASSM managed
– Initialization parameter:
• CREATE TABLE t1 (a CLOB); -- this will be a Securefile!!!
CREATE TABLE t1 (a CLOB) LOB(a) STORE AS SECUREFILE;
CREATE TABLE t2 (a CLOB) LOB(a) STORE AS SECUREFILE DEDUPLICATE);
CREATE TABLE t3 (a CLOB ENCRYPT USING 'AES128') LOB(a) STORE AS
SECUREFILE (CACHE);
DB_SECUREFILE = [NEVER | PERMITTED | PREFERRED | ALWAYS | IGNORE]
598Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
LONG/LOB  SecureFile Conversion
 LONG and BasicFiles LOB data types are still supported
– But they have many limitations (size, performance, operations)
 SecureFiles are fully transparent to applications!
– Data type still a LOB --- No functional differences --- API access via PL/SQL (DBMS_LOB), JDBC, .NET, PHP
 2 conversion options:
LONG
LONG RAW
CLOB
BLOB
SecureFile LOB
Data Pump Import (12c) using:
TRANSFORM=LOB_STORAGE:SECUREFILE
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
White Paper: http://www.oracle.com/technetwork/database/securefilesmigrationpaper-130440.pdf
DBMS_REDEFINITION
 MOS Note:728758.1 How to online convert from BasicFiles to SecureFiles
 http://docs.oracle.com/cd/E11882_01/appdev.112/e18294
/adlob_smart.htm#ADLOB45231
 Data always online - can be done in parallel
599Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Compression
Oracle 8i:
Index Compression
Oracle 9i:
Table Compression for DWH
Oracle 11g:
Advanced Compression
Oracle 11g:
Hybrid Columnar Compression
CREATE TABLE comp_basic...
COMPRESS [BASIC]
CREATE TABLE comp_oltp...
COMPRESS FOR OLTP
CREATE INDEX emp_idxcomp ... ON
emp(job,ename) COMPRESS 1;
CREATE TABLE comp_hccq...
COMPRESS FOR QUERY LOW|HIGH;
CREATE TABLE comp_hccq...
COMPRESS FOR ARCHIVE LOW|HIGH;
600Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Compression Overview
 http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN13059
601Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Advanced Compression
 Advanced Compression since Oracle 11g works for:
– All types of data
– Backup  New RMAN compression algorithm
– Data Pump exports
– Data Guard gap resolution and LGWR ASYNC transport
 Reduces resource requirements and costs!!!
– Storage & Performance
602Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Advanced (OLTP) Compression
 http://www.oracle.com/technetwork/database/focus-areas/storage/advanced-
compression-whitepaper-130502.pdf
603Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Advanced Compression
 Compression Advisor
– DBMS_COMPRESSION since Oracle 11.2
– Download for earlier releases:
http://www.oracle.com/technetwork/database/options/compression/index.html
 Migration in Oracle Database 12c:
– Data Pump import TRANSFORM=TABLE_COMPRESSION_CLAUSE:<clause>
604Upgrade, Migrate & Consolidate to Oracle Database 12c
exec DBMS_COMPRESSION.
GET_COMPRESSION_RATIO (<parameters here>)
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Hybrid Columnar Compression (HCC)
 Available only on Exadata, ZFS and Pillar Axiom 600 Storage
– WP: http://www.oracle.com/technetwork/middleware/bi-foundation/ehcc-twp-131254.pdf
– No extra license required
– For historical data getting VERY LITTLE changes
– Compression ratio is very high
– How it works:
 Tables are organized into Compression Units (CUs)
– CUs are larger than database blocks
 Within Compression Units, data is organized by column instead of by row
– Column organization brings similar values close together, enhancing compression
Compression Unit
10x to 15x
Reduction
605Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Hybrid Columnar Compression (HCC)
 Compression Units
– Logical structure spanning multiple database blocks
– Data organized by column during data load
– Each column is compressed separately
– All column data for a set of rows stored in compression unit
CU HEADER
BLOCK HEADER BLOCK HEADER BLOCK HEADER BLOCK HEADER
C3
C4
C1
C2
C7
C5
C6 C8
C8
Logical Compression Unit
606Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Upgrade, Migrate & Consolidate
1
2
3
4
5
Introduction
Preparation Steps
Upgrade / Migrate / Consolidate
Fallback Strategies
New Features
Performance Management
Wrap Up
607Upgrade, Migrate & Consolidate to Oracle Database 12c |
6
7
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Consolidation Planning Service
– Identifies optimal scenario and lowers risk
– Analysis of key parameters and components
– Comprehensive consolidation plan
– Detailed projections and recommendations
Migration Service
– Fast and safe database migration, optimization
– Planning, validation, upgrade, migration
– Migration of huge, complex databases (also SAP
environments) in a single weekend
– Compression of up to 70% for better performance
608
Load Testing & Analysis Service
– Evaluates impact of planned technology change
– Proactive risk identification
– Comprehensive testing solution
– SQL and Oracle database workload analysis
Performance Tuning & Benchmark Service
– Maintains optimal performance over time
– Quarterly assessments and monitoring of KPIs
– Best practice recommendations
– Database tuning
Advanced Customer Support - Lifecycle Support
Fast, Safe, Efficient; Delivered via Gateway or Onsite
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Advanced Customer Support - Lifecycle Support
 Features
– Database migration, tuning, improvements
 Compression, reorganization, implementation of further options, version jumping
– Delivered via secure gateway or onsite
 Benefits
– Fast, efficient, safe change
– Optimized database
– Better performance
– Risk prevention
 Long-Term Experience
– More than 2,000 migrations in 12 years
Centrica, UK
Migration of 4 large databases in SAP
environment with minimal downtime
Endesa, Spain
Datacenter transformation, migration,
preproduction testing, implementation
Learn more here
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle Consulting
Migration Factory:
over 25% reduction in
database upgrade &
migration cost and
duration (- 40% in Factory
effort)
IT landscape for Oracle / Non-Oracle Database and Operating System is very common
Benefit of DB12c and
Multitenant Architecture
 Higher DB performance and System
reliability
 DB-OS-HW layers fully integrated, TCO
reduction and ROI in shorter time
 More functionality already available as
default setup (i.e.Security)
 Less DB Administration (manage many as
one), DBAs can move to the next level
Upgrade, Migrate & Consolidate to Oracle Database 12c
Upgrade, Migrate & Consolidate on DB12c
Current Data Center
Oracle DB
v.11
v.10
v. 9
v. 8
New Data Center Multitenant Database
share servers, OS and database
Consolidation
DB Migration
Factory delivers
breakthroughs in
standardization
and automation
– like an
assembly line
vers.12c
610
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
EMEA OC and MF
Key Contacts
Cluster Database Local Consulting Contact
EMEA overall Ruud Riemslag / Luigi Villa / Mahesh Rao / Jo Pugh
Nordics Simon Mørup-Petersen
Benelux Ton van Kooten
DE/CH Lajos Hodi
France Claudine Millet
Italy David Cavanna
Iberia Anna Moreu
UK, Ireland Andy Higgins
Ecemea- Marcel Straka
Israel Eran Singer
Central Michael Hoffman
GR+NA Alkis Nikolaidis / Sherif Mourad
EG+AO Sherif Mourad
MEO Anil Almeid
Saudi Ahmad Al-Amer
Turkey Fatih Kilic
South Africa Janak (Bob) Desai
Luigi VillaRuud Riemslag Mahesh RaoJo Pugh
Emea Migration Factory CoreTeam
MF Offshore Database Solution Components Owners:
Bala (Balasubramanian Meyyappan): Oracle DB, GoldenGate, DB Testing
Shailendra (Shailendra Surywanshi): Non-Oracle to Oracle DB
Girish (Girish Narasanna): DB migration Estimation
Srini (Srinivas Thella): DB Application Readiness Assessment
611
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c
Oracle Database 12c Training
Next Steps: Develop your skills with available training offerings
Key Oracle Database 12c Courses
Oracle Database 12c Curriculum
 Oracle Database 12c: New Features for Administrators
 Oracle Database 12c: Administration Workshop
 Oracle Database 12c: Install and Upgrade Workshop
 Oracle Database 12c: Managing Multitenant Architecture
 Oracle Database 12c: High Availability New Features
 Oracle Database 12c: Global Data Services
 Oracle Database 12c: Data Guard Administration – Coming Soon!
 Oracle Database 12c: Performance Management and Tuning – Coming Soon!
 Oracle Database 12c: Clusterware Administration – Coming Soon!
 Oracle Database 12c: ASM Administration – Coming Soon!
 Oracle Database 12c: RAC Administration – Coming Soon!
For more information on training and certification offerings available, please go to:
http://education.oracle.com/database12c
612
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Resources
 Download slides from:
– http://blogs.oracle.com/UPGRADE
Upgrade, Migrate & Consolidate to Oracle Database 12c 613
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Issues to be aware of
 DBUA Upgrade moving files
– BUG 18312660 - 12C DBUA OVERWRITES DATAFILES WHEN "MOVE DATABASES FILES AS PART OF UPGRADE"
 Transportable Tablespaces Migration
– BUG 16396856 - HANG - SINGLE USER OPERATION
 Note: 1560225.1
Transportable Tablespace (TTS) Using Impdp Seems to Hang at TRANSPORTABLE_EXPORT/PLUGTS_BLK Phase
 Exadata 12.1.0.2
– Bug# 18925767 - INSTANCES WON'T START IN CLUSTER W/NODES USING EXAFUSION AND NON-EXAFUSION IPC
 Workaround: alter system set "_exafusion_enabled" = false scope = spfile;
 XML Upgrade Issue:
– Bug 18482096 - [ORA-01917: USER OR ROLE 'ANONYMOUS' DOES NOT EXIST FROM 11202 TO 12102
614Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Change Log 1 – Feb 4, 2014 – Nov 19, 2014
 4-Feb-2014
– Added slide 231 [hidden] for EBS specific resources
– Added QR codes for the blog
– Added OU slides at the end plus generated QR code
 12-Feb-2014
– Changed the Bielefeld University Transient Rolling Upgrade case to clarify the Transient Component
 19-Feb-2014
– Added to slide 166: MOS Note:1617946.1 (Standby Duplication from Active Database)
– Added slide 328 with PDB_PLUG_IN_VIOLATIONS
– Added hidden slide 320 – CDB/PDB charactersets
– Added slide 326 – Backup/Recovery
– Slide 322: Changed the Resource Manager example
 5-MAR-2014
– Added hidden slide 198: Data Pump COMPRESSION_ALGORITHM with example BASIC vs MEDIUM
 8-APR-2014
– Added several Notes to slide 161 (Exadata 12c)
 16-APR-2014
– Slide 61: Update to 11.2.0.4 for NOTE Poor Performance ( Wrong Query Result Bugs)
– Slide 315: Changed order of upgrade (SEED now together with PDBs) in accordance with the spec
– Slide 33: Changed query to detect DUP objects to a more efficient version – credits to Tom Kyte!
 22-MAY-2014
– Added WHOAMI slide for Ro, moved Mike’s WHOAMI to front
– Slide 9: Moved current time arrow forward a bit
– (deleted “Time to upgrade?” slide with cell phones)
– Slide 52: Updated screenshot
– (deleted “Establish a Maintenance Strategy” slide)
– Slide 61, 63, 66, 67: Updated screenshots
– Slide 115, 190-193, 278: Changed OL6 to OL 5.8 to match certifications available for older releases
– Slide 151: Slide wording change for Orachk/RACchk
– Slide 231: Some wording changes such as “brutal” -> “brute force” and “The smart approach” -> “A same-OS approach”
– Slides 260-267, 277-279: changed “5 min” to “<5 min”
– Slide 281: Added animation step to have entire diagram reappear at the end
– Slide 282: Added emphasis around “Made Easy”
– Slide 327: Updated slide with DMU 2.0 information
– Slide 337: Updated font to be more visible for 12c beta, RC6, etc.
– Slide 338, 339, 345, 349: Slide wording updates
– Slide 375: Hidden by default
– Slide 401: Fixed typo “Partitoned” -> “Partitioned”
– Slide 407: added link to SQL Tuning Guide
– Slide 432: Changed DBMS_SPM to DBMS_SPA
 3-JUN-2014
– Slide 488 added: Credits
– Slide 485 added: Issues (collector slide for known issues to be aware of)
– Slide 424/421: changed sources for plans / removed transport option, changed STS to "AWR into STS"
 7-JUL-2014
– Slide 442: Manual Fixed Objects Stats Gathering is not necessary in Oracle 12c anymore as it is included in the Auto Stats Gathering job
– Slide 238: Added EBS Cert information
– Slide 309: Added information about remote cloning in PSU3 for 12.1.0.1
 2-Sep-2014
– Slide 81: Updated Unified Auditing information
 10-Sep-2014
– Slide 137: NEW – RMAN catalog upgrade 12.1.0.2
– Slides 435-437, 438, 441, 443 (SPM) – redesigned and updated for 12.1.0.2
– Slide 13: New about Oracle 12.2
 12-Oct-2014
– Exchanged several slides with slides from our OOW 2014 talk
– Slide 60ff: updated flow with 12.1.0.2 information
– Slide 169: GIMR information for 12.1.0.2 added
 28-OCT-2014
– Slide 75 (hidden): Solaris performance regressions
– Slide 93 (hidden): _optimizer_aggr_groupby_elim
– Slide 45: (now hidden) MOS Note for cleanup does not exist anymore – offered a script to cleanup
– Slide 45: Query connection . Left parenthesis was missing
– Slide 92: Added link to the doc explaining INLINE LOB usage and row chaining pitfall with Extended Varchar
 13-NOV-2014
– Slide 89: NEW – job_queue_processes
– Slide 100 – NEW – graph slide
– Slide 103: Changed Screenshot to fit for Oracle 12.1.0.2
– Slide 182: ASM on NFS  https://docs.oracle.com/cd/E11882_01/install.112/e47689/app_nas.htm#LADBI1372 --- and MOS 1570073.1
– Slide 335: Added FORCE LOGGING clause to the PDB Standby Slide – does not work right now due to bug:18902135
– Slide 353: Added Oracle Fail Safe and Flashback Pluggable Database
– Slide 396: NEW – Statistic Enhancements in Oracle 12c
– Slide 428: Added ESTIMATE PERCENTAGE
– Slide 425 NEW: graph slide
– Slide 430 NEW: In 12c Inc Stats have a way smaller footprint on disk in WRH$ tables + Inc Stats work with Partitioned Exchange + Stale
percentage
– Slide 431: NEW DBMS_STATS.REPORT …
– Slide 432: NEW DBMS_STATS.Report
– Slide 435: NEW _run_everything_fast=true
– Slide 447: Added the information that before 12c only hints got stored but since 12c entire plans will be kept
 19-NOV-2014
– Slide 277: Exchanged OGG Link on OTN with Zero Downtime OGG White Paper Link
Upgrade, Migrate & Consolidate to Oracle Database 12c 615
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Change Log 2 – Dec 9, 2014 – May 27, 2015
 9-Dec-2014
– Slide 95: New parameter added to switch InMem completely off
– Slide 395: Free (not in ASO anymore) Security Features in 12c
– Slide 86: SQLNET.ALLOWED_LOGON_VERSION_SERVER  changed to 10.2.0.5 and the error number
– Slide 202: Interhyp Exadata Case: Added MOS Note that Exa BPs are supported in non Exa envs
– Slide 322-324: Changed designed, added c##-overwrite parameter from 12.1.0.2
– Slide 65: corrected 12.1.0.1 note number  Now 12.1.0.2
– Slide 67ff: updated screenshots
– Slide 441: optimizer_dynmamic_sampling – added info that it has value 11 option since Oracle 11.2.0.4 – but with less functionality
than in 12c
– Slide 162 – added note 759868.1 (How to step down from RAC to non-RAC) just in case …
 21-JAN-2015
– Slide 5: Removed
– Slide 505: AutoDOP: Changed to accommodate 12c behavior – credits to Yasin Baskan
– Slide 316: Added deprecation of non-CDB architecture
– Slide 353: Added more deprecated features for Multitenant
 6-Feb-2015
– Slide 356: Added Flashback Transaction Backout to the list of unsupported CDB features
– Slide 326: Added new White Paper about Security Concepts in Oracle Multitenant
http://www.oracle.com/technetwork/database/multitenant/learn-more/multitenant-security-concepts-12c-2402462.pdf
– Slide 162: Reversed order and added Windows Remote Registry info at the buttom with link to Ms Technet
– Slide 182 (hidden): Added 10.2. Support Note on Exadata - 1965897.1 - Oracle Database 10g Release 2 Support on Exadata
– Slide 183: (hidden) Added MOS Note:1681467.1 GI and Database Upgrade from 11.2.0.2-4, 12.1.0.1 to 12.1.0.2 on Exadata and MOS
Note:1364356.2 Info Center Upgrade
– Slide 59 – Newly added with MOS Note https://support.oracle.com/epmos/faces/DocumentDisplay?id=1962125.1 Patching Delivery
Methods
– Slide 7/8 – adjusted content to reflect End of Premier Support
 7-Feb-2015
– Slide 94: Fixed Doc ID of the support note for the related bug
– Slide 106: Added reference to Lifecycle Management Pack
– Slide 279: Softened the wording about zero-downtime upgrades so note that GoldenGate can do this depending on the application and
app server configuration
– Slide 334: changed wording to say that deinstalling options from a PDB is “not supported” instead of often not working
– Slide 343: Added PDB2 and PDB3, fade them during unplug of PDB1
– Slide 378: Added note that ADO is part of ACO
– Slide 388: Changed title to indicate that Far Sync is part of Active Data Guard
– Slide 431: Added the word “history” so that people don’t get confused between this stats retention and performance statistics
retention in AWR
– Slide master: updated Copyright date to 2015
 10-FEB-2015
– Slides 60, 69, 70 (PSU Schedule), 75 (Wrong Results) – all updated/refreshed with current screen shots
– Slide 76 moved to 60 (still hidden) and updated with screenshot from Note:1962125.1
– Slide 328 – Brackett was missing in the code example
– Side 399 – added “_optimizer_apaptive_plans”
– Slide 351 – Extended Slide Notes section with more explanation and the underscore to turn multiple lgwr-slaces off
 26-FEB-2015
– Slide 14: Added
– Slide 20: Removed (Link to MAA)
– Slide 467: added Note Nr for Multitenant Replay https://support.oracle.com/epmos/faces/DocumentDisplay?id=1937920.1
– Slide 246/247 – Added dbms_file_transfer
– Slide 164/165: ORAchk Slides updated – now 2 slides
– Slide 36: Fixed type
 22-MAR-2015
– Slide 4: Added (temporary, just for fun)
– Slide 68: Updated screenshot so that the note about 12.1.0.2 being EE-only is there
– Slide 160: Added reference for using standby with different versions, reformatted bullet points to include note titles
 20-APR-2015
– Slide 373: Downgrade – removed outdated 11.1.0.7 MOS Note:443890.1 and 11.2.0.x MOS Note:883335.1 – added correct 12c note
plus additional information
– Slide 331 – Added Snapthot Clone syntax
– Slide 514: Added White Paper Link: http://www.oracle.com/technetwork/database/securefilesmigrationpaper-130440.pdf
– Slide 15/16: Updated Screenshots
– Slide 376 – Updated Screen Shot
– Slide 332: corrected typo: TRANSPORT_DATAFILES
 7-MAY-2015
– Slides 12 – New slide: 11.2.0.4 vs 12.1.0-.2
– Slide 21 – New Slide: Winners use 12c, as Teaser Slide
– Slide 25: Added "We'll wait for the 2nd release"
– Slide 26: New slide: SAP certification
– Slide 48/49 – consolidated into 1 slide and moved to SLIDE 85
– Slide 59 – New slide: Where is SE 12.1.0.2
– Slide 323 – New slide: Possible deployments of Oracle 12c (Stand alone, single tenant, multitenant)
– Slide 338 – Changed to reflect note about creating a CDB with fewer options
– Slide 355 – New hidden slide: AWR Lite Snapshots
– Slide 362 – New slide: Changes for DBAs – to be continued
– Slide 410 – New slide: Optimizer parameters
– Slides 490/491 – New slides: The right testing tools
 13-MAY-2015
– Slide 214 – Added FLASHBACK_SCN
– Slide 215 – Added subtitle, updated with the new way of performing parallel index build, replaced the COMMIT_WAIT
recommendation with transform parameter
– Slide 216 – Added subtitle, changed line spacing to accommodate
– Slide 217 – Added subtitle
 27-May-2015
– Slide 329 – Changed "PDBs can have their own TEMP" into "PDBs must have" – (Doc ID 2004595.1)
Upgrade, Migrate & Consolidate to Oracle Database 12c 616
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Change Log 3 – Jun 18, 2015 - …
 18-JUN-2015
– Slide 217: Heading typo corrected "Practices" to "Practices"
– Slide 164 – DB Home can have higher PSU than GI Home – this is supported
– Slide 167 – new screenshot for ORAchk 12.1.0.4
– Slide 534/535: Added for O2O Support by Oracle ACS (even though the slide does not mention O2O)
 20-JUL-2015
– Slide 23 – NEW – Reference Quote RZF NRW
– Slide 24 – NEW – Reference Article Mobiliar Insurance
– Slide 28 – Added SAP In Memory information and screenshot
– Slide 79 – Updated Screenshot "Avoid Poor Performance"
– Slide 80 – Added 12c Note for SPARC platform
– Slide 94 – added "physical/real" to the recommendation for CPU cores – added a reference to ASkTom
– Slide 364: added "BEQ"
– Slide 324: Updated Screenshot now saying "after 12.2"
– Slide 92 – Added "in a new DB" for "Unified is enabled by default"
 1-Sep-2015
– Slide 19 – Added: Hands on lab
– Slide 21 – deleted: Data Pump OTN
– Slide 61 – SE2 updated
– Slide 65 – Download 12.1.0.2 from MOS refreshed with new patch id
– Slide 71-73, 76-77, 79: updated screenshots
– Slide 247/286: Deleted
 15-Sep-2015
– Slide 80 – NEW – Patches for SPM
– Slide 282 – NEW – OGG Readiness Scripts
– Stopped noting down changes as I changed too many things … sorry!
617Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Credits go to …
 Tom Kyte
 Francois Lange
 Magnus Fagertun (Oracle Norway)
 Geoffroy Dessmond
 Marco Patzwahl (MuniqSoft) for proofreading and so many tiny little findings I would have never catched!!
 Mathias Zarick (Trivadis Delphi GmbH Austria) for the detailed feedback after our Vienna workshop
 Dr. Peter Alteheld for mentioning so many tiny little changes in 12c not to be found under New Features!
 Michel van de Wouw (TrustOn)
 Alessandro Suardi, Luca Caimi (Oracle Italia)
 Yasin Baskan (Oracle PM for Parallel Execution)
 All the other people from Oracle giving feedbacks and contributing their slides, especially in the New Features section
618Upgrade, Migrate & Consolidate to Oracle Database 12c
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Things to include in a future version
 SRDC : Data Collection For Database Upgrade Slow Or Hung Issues (Doc ID 1918865.1)
 SRDC : INVALID objects Before or After Upgrade (Doc ID 1918862.1)
 SRDC - Data Collection for Upgrade issues (Doc ID 1672387.1)
 SRDC - Data Collection for Downgrade Issues (Doc ID 1672880.1)
 New command syntax: SELECT ename from container(scott.emp) WHERE IN CON_ID;
 MOS Note: 1932762.1
Complete checklist for manual upgrade from 12.1.0.1 to 12.1.0.N (Full CDB Upgrade)
 MOS Note: 1933391.1
Complete checklist for 12c R1 PDB upgrade (Upgrading single/multiple PDB)
 MOS Note: 1932340.1
How to execute sql scripts in Multitenant environment (catcon.pl)
 MOS Note: 1933011.1
Complete Checklist for DBUA Upgrade from 12.1.0.1 to 12.1.0.N
 https://mosemp.us.oracle.com/epmos/faces/DocContentDisplay?id=1958998.1
 MOS Note: 1576755.1 Step by Step Examples of Migrating non-CDBs and PDBs Using ASM for File Storage

Upgrade, Migrate & Consolidate to Oracle Database 12c 619
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 620Upgrade, Migrate & Consolidate to Oracle Database 12c
Oracle 12 Upgrade
Ad

More Related Content

What's hot (20)

Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
Anil Nair
 
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Yuya Ohta
 
Long live to CMAN!
Long live to CMAN!Long live to CMAN!
Long live to CMAN!
Ludovico Caldara
 
Spark SQL principes et fonctions
Spark SQL principes et fonctionsSpark SQL principes et fonctions
Spark SQL principes et fonctions
MICHRAFY MUSTAFA
 
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
オラクルエンジニア通信
 
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
オラクルエンジニア通信
 
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
vasuballa
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
Anil Nair
 
新機能によるデータベースシステムの改善ポイント
新機能によるデータベースシステムの改善ポイント新機能によるデータベースシステムの改善ポイント
新機能によるデータベースシステムの改善ポイント
オラクルエンジニア通信
 
Oracle Enterprise Manager
Oracle Enterprise ManagerOracle Enterprise Manager
Oracle Enterprise Manager
Bob Rhubart
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
Markus Michalewicz
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Introduction to Oracle Cloud
Introduction to Oracle CloudIntroduction to Oracle Cloud
Introduction to Oracle Cloud
johnnhernandez
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
Markus Michalewicz
 
DataGuard体験記
DataGuard体験記DataGuard体験記
DataGuard体験記
Shinnosuke Akita
 
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
オラクルエンジニア通信
 
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Synaltic Group
 
Oracle GoldenGate Cloud Service(GGCS)概要
Oracle GoldenGate Cloud Service(GGCS)概要Oracle GoldenGate Cloud Service(GGCS)概要
Oracle GoldenGate Cloud Service(GGCS)概要
オラクルエンジニア通信
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
Anil Nair
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
Anil Nair
 
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Yuya Ohta
 
Spark SQL principes et fonctions
Spark SQL principes et fonctionsSpark SQL principes et fonctions
Spark SQL principes et fonctions
MICHRAFY MUSTAFA
 
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
Oracle GoldenGate 19c を使用した 簡単データベース移行ガイド_v1.0
オラクルエンジニア通信
 
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
オラクルエンジニア通信
 
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
vasuballa
 
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the CloudOracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Oracle RAC Virtualized - In VMs, in Containers, On-premises, and in the Cloud
Markus Michalewicz
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
Anil Nair
 
新機能によるデータベースシステムの改善ポイント
新機能によるデータベースシステムの改善ポイント新機能によるデータベースシステムの改善ポイント
新機能によるデータベースシステムの改善ポイント
オラクルエンジニア通信
 
Oracle Enterprise Manager
Oracle Enterprise ManagerOracle Enterprise Manager
Oracle Enterprise Manager
Bob Rhubart
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
Markus Michalewicz
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Introduction to Oracle Cloud
Introduction to Oracle CloudIntroduction to Oracle Cloud
Introduction to Oracle Cloud
johnnhernandez
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
Markus Michalewicz
 
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
Oracle Database / Exadata Cloud 技術情報(Oracle Cloudウェビナーシリーズ: 2020年7月9日)
オラクルエンジニア通信
 
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Talend Data Mapper : Simplifiez-vous l'intégration de SAP !
Synaltic Group
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
Anil Nair
 

Viewers also liked (20)

Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Upgrade/Migrate to Oracle 12c: Live and Uncensored!Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Guatemala User Group
 
Upgrading To 11g
Upgrading To 11gUpgrading To 11g
Upgrading To 11g
oracleonthebrain
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
Nelson Calero
 
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project ExperiencesUpgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Bruno Alves
 
How oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 finalHow oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 final
Ajith Narayanan
 
tow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualboxtow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualbox
justinit
 
Oracle 12c SQL: Date Ranges
Oracle 12c SQL: Date RangesOracle 12c SQL: Date Ranges
Oracle 12c SQL: Date Ranges
Stew Ashton
 
Oracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic SamplingOracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic Sampling
Igor Usoltsev
 
10 tips for successful 12.2 upgrade
10 tips for successful 12.2 upgrade10 tips for successful 12.2 upgrade
10 tips for successful 12.2 upgrade
Ravi Madabhushanam
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
Guatemala User Group
 
Oracle 12c in memory en action
Oracle 12c in memory en actionOracle 12c in memory en action
Oracle 12c in memory en action
Laurent Leturgez
 
SAP System copy
SAP System copySAP System copy
SAP System copy
ashish_bbd
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration Overview
Sitaram Kotnis
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
Markus Flechtner
 
Backup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RACBackup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
Oren Nakdimon
 
Oracle sharding : Installation & Configuration
Oracle sharding : Installation & ConfigurationOracle sharding : Installation & Configuration
Oracle sharding : Installation & Configuration
suresh gandhi
 
Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
Zohar Elkayam
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
Guatemala User Group
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Yury Velikanov
 
Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Upgrade/Migrate to Oracle 12c: Live and Uncensored!Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Upgrade/Migrate to Oracle 12c: Live and Uncensored!
Guatemala User Group
 
My Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12cMy Experience Using Oracle SQL Plan Baselines 11g/12c
My Experience Using Oracle SQL Plan Baselines 11g/12c
Nelson Calero
 
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project ExperiencesUpgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Upgrading to Oracle SOA 12.1 & 12.2 - Practical Steps and Project Experiences
Bruno Alves
 
How oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 finalHow oracle 12c flexes its muscles against oracle 11g r2 final
How oracle 12c flexes its muscles against oracle 11g r2 final
Ajith Narayanan
 
tow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualboxtow nodes Oracle 12c RAC on virtualbox
tow nodes Oracle 12c RAC on virtualbox
justinit
 
Oracle 12c SQL: Date Ranges
Oracle 12c SQL: Date RangesOracle 12c SQL: Date Ranges
Oracle 12c SQL: Date Ranges
Stew Ashton
 
Oracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic SamplingOracle 12c Automatic Dynamic Sampling
Oracle 12c Automatic Dynamic Sampling
Igor Usoltsev
 
10 tips for successful 12.2 upgrade
10 tips for successful 12.2 upgrade10 tips for successful 12.2 upgrade
10 tips for successful 12.2 upgrade
Ravi Madabhushanam
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
Guatemala User Group
 
Oracle 12c in memory en action
Oracle 12c in memory en actionOracle 12c in memory en action
Oracle 12c in memory en action
Laurent Leturgez
 
SAP System copy
SAP System copySAP System copy
SAP System copy
ashish_bbd
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration Overview
Sitaram Kotnis
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
Markus Flechtner
 
Backup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RACBackup and Restore of database on 2-Node RAC
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
Oren Nakdimon
 
Oracle sharding : Installation & Configuration
Oracle sharding : Installation & ConfigurationOracle sharding : Installation & Configuration
Oracle sharding : Installation & Configuration
suresh gandhi
 
Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
Zohar Elkayam
 
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Yury Velikanov
 
Ad

Similar to Oracle 12 Upgrade (20)

Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
DLT Solutions
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
DLT Solutions
 
ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5
Bruno Alves
 
oracle upgrade 2015_509_Swonger_ppt.pptx
oracle upgrade 2015_509_Swonger_ppt.pptxoracle upgrade 2015_509_Swonger_ppt.pptx
oracle upgrade 2015_509_Swonger_ppt.pptx
ssuser670564
 
WLS12c_NewFeatures_Basics
WLS12c_NewFeatures_BasicsWLS12c_NewFeatures_Basics
WLS12c_NewFeatures_Basics
Sudhesh Pnair
 
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Milomir Vojvodic
 
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
vasuballa
 
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
vasuballa
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
Insight Technology, Inc.
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
Maria Colgan
 
MV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-clickMV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-click
Ruggero Citton
 
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
Deep Dive: More Oracle Data Pump Performance Tips and TricksDeep Dive: More Oracle Data Pump Performance Tips and Tricks
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
Guatemala User Group
 
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesEbs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practices
aioughydchapter
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
pasalapudi123
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Oracle RAC One Node 12c Overview
Oracle RAC One Node 12c OverviewOracle RAC One Node 12c Overview
Oracle RAC One Node 12c Overview
Markus Michalewicz
 
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
vasuballa
 
Oracle Database Exadata Cloud Service Conference
Oracle Database Exadata Cloud Service ConferenceOracle Database Exadata Cloud Service Conference
Oracle Database Exadata Cloud Service Conference
Okcan Yasin Saygılı
 
OOW15 - technical upgrade best practices for oracle e-business suite 12.2
OOW15 - technical upgrade best practices for oracle e-business suite 12.2OOW15 - technical upgrade best practices for oracle e-business suite 12.2
OOW15 - technical upgrade best practices for oracle e-business suite 12.2
vasuballa
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
DLT Solutions
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
DLT Solutions
 
ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5ukoug-soa-sig-june-2016 v0.5
ukoug-soa-sig-june-2016 v0.5
Bruno Alves
 
oracle upgrade 2015_509_Swonger_ppt.pptx
oracle upgrade 2015_509_Swonger_ppt.pptxoracle upgrade 2015_509_Swonger_ppt.pptx
oracle upgrade 2015_509_Swonger_ppt.pptx
ssuser670564
 
WLS12c_NewFeatures_Basics
WLS12c_NewFeatures_BasicsWLS12c_NewFeatures_Basics
WLS12c_NewFeatures_Basics
Sudhesh Pnair
 
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Oracle real time replica solution (Oracle GoldenGate) in Telco and FSI vertic...
Milomir Vojvodic
 
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
OOW16 - Deploying Oracle E-Business Suite for On-Premises Cloud and Oracle Cl...
vasuballa
 
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
OOW15 - Installation, Cloning, and Configuration of Oracle E-Business Suite 12.2
vasuballa
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
Insight Technology, Inc.
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
Maria Colgan
 
MV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-clickMV2ADB - Move to Oracle Autonomous Database in One-click
MV2ADB - Move to Oracle Autonomous Database in One-click
Ruggero Citton
 
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
Deep Dive: More Oracle Data Pump Performance Tips and TricksDeep Dive: More Oracle Data Pump Performance Tips and Tricks
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
Guatemala User Group
 
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic - Business Analytics And Big Data Partner Forum Dubai 15.11.
Milomir Vojvodic
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesEbs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practices
aioughydchapter
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
Ebs upgrade-to-12.2 technical-upgrade_best_practices(aioug-aug2015)
pasalapudi123
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Oracle RAC One Node 12c Overview
Oracle RAC One Node 12c OverviewOracle RAC One Node 12c Overview
Oracle RAC One Node 12c Overview
Markus Michalewicz
 
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
OOW15 - Planning Your Upgrade to Oracle E-Business Suite 12.2
vasuballa
 
Oracle Database Exadata Cloud Service Conference
Oracle Database Exadata Cloud Service ConferenceOracle Database Exadata Cloud Service Conference
Oracle Database Exadata Cloud Service Conference
Okcan Yasin Saygılı
 
OOW15 - technical upgrade best practices for oracle e-business suite 12.2
OOW15 - technical upgrade best practices for oracle e-business suite 12.2OOW15 - technical upgrade best practices for oracle e-business suite 12.2
OOW15 - technical upgrade best practices for oracle e-business suite 12.2
vasuballa
 
Ad

Recently uploaded (20)

Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 

Oracle 12 Upgrade

  • 1. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Roy Swonger Senior Director & Product Manager Database Upgrade & Utilities Oracle Corporation Updated: 28-NOV-2015 Upgrade, Migrate & Consolidate to Oracle Database 12c Mike Dietrich Master Product Manager Database Upgrade Oracle Corporation
  • 2. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | $> whoami 2 20 years w/Oracle Previously with DEC Rdb 11+ years managing Data Pump Database Upgrade SQL*Loader Transportable Tablespaces Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 3. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | $> whoami 3Upgrade, Migrate & Consolidate to Oracle Database 12c 6 years RDBMS Core & Mission Critical Support 5.5 years Technology Presales for DataGuard, Upgrades >7.5 years ST Upgrade Development Team 50% Reference Projects 50% Workshops Worldwide + x% Development Work Mike Dietrich Master Product Manager Database Upgrades & Migrations MikeDietrichDE http://blogs.oracle.com/UPGRADE
  • 4. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 4Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 5. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Reference Involvement Upgrade, Migrate & Consolidate to Oracle Database 12c 5
  • 6. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Reference Involvement: Results >65000 Downloads since June 2013 Upgrade, Migrate & Consolidate to Oracle Database 12c 6
  • 7. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | When does Oracle Database 11.2 run out of Premier Support? Already over since 31-Jan-2015 Upgrade, Migrate & Consolidate to Oracle Database 12c 7
  • 8. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Supported Versions Upgrade, Migrate & Consolidate to Oracle Database 12c 8 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 Oracle 10.1 (GA: Jan 2004) Oracle 10.2 (GA: Jul 2005) Oracle 11.1 (GA: Aug 2007) Oracle 11.2 (GA: Sep 2009) Oracle 12.1 (GA: Jun 2013) Oracle 12.2 (GA: xxx 2016) today Premier Support Waived Extended Support Paid Extended Support Sustaining Support Jan 2009 Jan 2012 Jul 2010 Jul 2013 Aug 2012 Aug 2015 Jan 2015 Jun 2018 Jun 2021 Dec 2020May 2017
  • 9. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Patching for Oracle Database 11.2 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 Oracle 11.2 (GA: Sep 2009) Oracle 12.1 (GA: Jun 2013) Oracle 12.2 (GA: xxx 2016) Upgrade, Migrate & Consolidate to Oracle Database 12c 9 Jun 2018 Jun 2021 Jan 2015 Dec 2020May 2017 • Release Schedule of Current Database Releases MOS Note.742060.1
  • 10. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | When will Oracle Database 12.2 be released? Let's be honest – you will wait usually for the 1st patch set for the 2nd release Upgrade, Migrate & Consolidate to Oracle Database 12c 10
  • 11. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Why you can't wait for the 2nd Release? 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 Oracle 11.2 (GA: Sep 2009) Oracle 12.1 (GA: Jun 2013) Oracle 12.2 (GA: xxx 2016) Upgrade, Migrate & Consolidate to Oracle Database 12c 11 Jun 2018 Jun 2021  Every release is a full release  Every release will get a significant number of new features and changes  There's no such thing as THE 2nd release anymore! 0 10 20 30 40 50 Oracle 9.2 .. 10.1 Oracle 10.1 .. 10.2 Oracle 10.2 .. 11.1 Oracle 11.1 .. 11.2 Oracle 11.2 .. 12.1 Oracle 12.1 .. 12.2 Span between Releases in Months Patchset Jan 2015 Dec 2020May 2017
  • 12. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Lifetime Support Policy  http://www.oracle.com/us/support/ lifetime-support/index.html  MOS Note: 209768.1 for Support Policy Explanation and details 12Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 13. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Companion  MOS Note:1462240.1 Upgrade Companion 12c 13Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 14. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Upgrade: OTN Web Site  http://otn.oracle.com/goto/upgrade Upgrade, Migrate & Consolidate to Oracle Database 12c 14
  • 15. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Upgrade Blog  http://blogs.oracle.com/UPGRADE Upgrade, Migrate & Consolidate to Oracle Database 12c 15
  • 16. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Try the Upgrade: Hands On Lab  http://blogs.oracle.com/UPGRADE Upgrade, Migrate & Consolidate to Oracle Database 12c 16
  • 17. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Internal Only Download Page  http://database.us.oracle.com/pls/htmldb/f?p=301:193:0 Upgrade, Migrate & Consolidate to Oracle Database 12c 17
  • 18. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Who's already live on Oracle Database 12c? Winners are live on Oracle Database 12c already  Upgrade, Migrate & Consolidate to Oracle Database 12c 18
  • 19. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | – Michael Kuhn, Deutsche Vermögensberatung AG “At DVAG we do thorough testing in a 3-step approach for our critical environments. The decision to upgrade directly to Oracle Database 12c skipping the terminal patch set of the previous database release was taken in order to save us one complete testing cycle, and furthermore the accompanying costs as well" 19Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 20. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Anja Albrecht, Rechenzentrum der Finanzverwaltung NRW "The migration of all 16 German Electronic Income Tax databases to Oracle Database 12c in less than 10 months went smooth and fine. We are very satisfied with the performance and the robustness of Oracle Database 12c." 20Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 21. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | http://www.oracle.com/technetwork/issue-archive/2015/15-may/o35diemobiliar-2541568.html Upgrade, Migrate & Consolidate to Oracle Database 12c 21
  • 22. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Time to Upgrade? Upgrade, Migrate & Consolidate to Oracle Database 12c 22
  • 23. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Terminology: Upgrade vs. Migration  Upgrade – Independent of size  Migration – Usually depending on size 23Upgrade, Migrate & Consolidate to Oracle Database 12c |
  • 24. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Why people usually don't upgrade? "You need to upgrade now as your release is out of Premier Support already!!!" "Upgrading just costs a lot!" "I don't see any benefits by upgrading to a newer release" "It will just introduce new bugs and issues" "I'm happy with the features of Oracle 8i" Upgrade, Migrate & Consolidate to Oracle Database 12c 24 "We'll wait for the 2nd release only" "Application is not certified"
  • 25. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle and SAP – Certified in Oracle Database 12.1.0.2  SAP has already certified Oracle 12.1.0.2 as of March 31, 2015  For certified Oracle options see: – http://www.oracle.com/us/solutions/ sap/sap-database/index.html  SAP has already certified Oracle 12.1.0.2 with In-Memory as of June 30, 2015 – http://tinyurl.com/CertOracleSAP-InMem Upgrade, Migrate & Consolidate to Oracle Database 12c 25  http://tinyurl.com/CertOracleSAP
  • 26. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | The Magic Questions  We need to know ... – New hardware? – Same or different OS? OS version? – Character Set change? – Single Tenant / Multitenant? – Number of databases? – Size of databases? – Exact database source and target versions? – Downtime and fallback requirements? – Test environment and tools? Upgrade, Migrate & Consolidate to Oracle Database 12c 26 …
  • 27. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Are you maintaining a Zoo? 3 different OS families  7 different major Oracle releases 6 of 8 OS desupported  77 of 80 databases out of Support* Upgrade, Migrate & Consolidate to Oracle Database 12c 27 * in Feb 2014
  • 28. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Maintaining a Zoo is EXPENSIVE Maintenance Costs Upgrade/Migration Costs Upgrade, Migrate & Consolidate to Oracle Database 12c 28
  • 29. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Another example from the Real World OS change Client changeApplication change HW change Minimal Downtime between Oracle 7.3 and Oracle 11.210-15 databases No upgrade done for ~17 years!!! Upgrade, Migrate & Consolidate to Oracle Database 12c 29
  • 30. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade/Migrate Older Oracle Releases Oracle 8i Less Downtime? Oracle 9i Oracle 5/6/7/8 Oracle 10.1 Oracle 9.2 Near-Zero Downtime? exp/imp Transportable Tablespaces Same platform only GoldenGate+ Upgrade, Migrate & Consolidate to Oracle Database 12c 30
  • 31. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Options to Oracle Database 12c Oracle 11.1 Less Downtime? Oracle 11.2.0.2 Oracle 10.2 Oracle 11.2.0.3/4 Near-Zero Downtime? Transportable Tablespaces Logical Standby GoldenGat e+ Transient Standby Full Transportable Export/Import RMAN Inc Bck+ expdp/impdp catctl.pl DBUA HW Upgrade, Migrate & Consolidate to Oracle Database 12c 31
  • 32. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Migration Options to Oracle Database 12c Oracle 11.1 Less Downtime? Oracle 11.2.0.1/2 Oracle 10.2 Oracle 11.2.0.3/4 Near-Zero Downtime? GoldenGat e+ Full Transportable Export/Import RMAN Inc Bck+ Transportable Tablespaces expdp/impdp SQL*Loader CTAS, COPY TDB Only same Endianness Upgrade, Migrate & Consolidate to Oracle Database 12c 32
  • 33. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Step-by-Step Strategy – In pieces over time – Risk mitigating  Big-Bang Strategy – All in one downtime window – Sometimes necessary due to dependencies  Least Critical First – Learn more with every step  Most Critical First – Learn about almost all from the beginning Upgrade/Migration Strategies? 33Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 34. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Approach? Planning Data Gathering Testing Upgrade/ Migration Go-Live Quarterly Patching Upgrade, Migrate & Consolidate to Oracle Database 12c 34
  • 35. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Phases 1 • Data Gathering Phase •The more you know the better it is! 2 • Test Phase 3 • Upgrade/Migration Phase 4 • Go-Live Phase 5 • Future Phase  Application:  Owner?  Version?  Dependencies?  Certification?  Timeframe?  Test budget?  Database:  Owner?  Exact version and patches?  Size?  Downtime?  Dependecies?  Gateways?  Operating system version? Upgrade, Migrate & Consolidate to Oracle Database 12c 35
  • 36. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Phases 1 • Data Gathering Phase 2 • Test Phase •Test, test, test ... and test!!! 3 • Upgrade/Migration Phase 4 • Go-Live Phase 5 • Future Phase  1:1 test systems?  Documentation?  Network bandwidth?  Performance data from PROD?  Testing tools: RAT?  Batches, long-ops?  Multiple successful test runs?  Performance protection?  Be open to late patches/PSUs!  Fallback strategy tested? Upgrade, Migrate & Consolidate to Oracle Database 12c 36
  • 37. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Phases 1 • Data Gathering Phase 2 • Test Phase 3 • Upgrade/Migration Phase •Relax ... 4 • Go-Live Phase 5 • Future Phase  Is everybody informed?  Relax and lean back!  Don't overtestosteronize!! Upgrade, Migrate & Consolidate to Oracle Database 12c 37
  • 38. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Phases 1 • Data Gathering Phase 2 • Test Phase 3 • Upgrade/Migration Phase 4 • Go-Live Phase •Keep an extra eye on performance 5 • Future Phase  Monitor performance behaviour  Any issues?  Use collected data from pre- upgrade to fix issuse  Open an SR with Support Upgrade, Migrate & Consolidate to Oracle Database 12c 38
  • 39. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Project Phases 1 • Data Gathering Phase 2 • Test Phase 3 • Upgrade/Migration Phase 4 • Go-Live Phase 5 • Future Phase •It's not over now ... It just started!!!  Don't lean back – it just started!  Patching strategy?  Next available PSU?  Next available patch set?  When will be the next upgrade?  Adopt useful new features  Many features come for free Upgrade, Migrate & Consolidate to Oracle Database 12c 39
  • 40. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 40Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 41. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Make sure everything is in good shape ...  So that you don't go off the rails! 41Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 42. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Preparation Checklist  In the SOURCE environment:  Empty the recycle bin  Check for INVALID objects in SYS & SYSTEM  Check for duplicate objects in SYS & SYSTEM  Check for INVALID components  Check for mandatory components  Remove obsolete components  Preserve performance statistics  Check network performance Clean Up Components Performance  Perform Integrity checksOptional 42Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 43. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Clean Up: Recycle Bin  Especially before patch set or release upgrade purge the recycle bin: – Since Oracle 12c this will be done by the preupgrade_fixups.sql  General recommendation: – Empty the recycle bin at least once per week with an automatic job during off-peak times Upgrade, Migrate & Consolidate to Oracle Database 12c 43 purge DBA_RECYCLEBIN;
  • 44. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Clean Up: Invalid Objects  Check for INVALID objects – There should be no invalid objects in Oracle supplied user schemas – especially none owned by SYS or SYSTEM – Recompile invalid objects before upgrade/migration Upgrade, Migrate & Consolidate to Oracle Database 12c 44 select unique OBJECT_NAME, OBJECT_TYPE, OWNER from DBA_OBJECTS where STATUS='INVALID' order by OWNER; @?/rdbms/admin/utlrp.sql
  • 45. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Clean Up: Duplicate Objects  Always check for DUPLICATE objects in SYS & SYSTEM  To clean up use script but only under Oracle Support's supervision 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'); 45Upgrade, Migrate & Consolidate to Oracle Database 12c select 'DROP ' || object_type || ' SYSTEM.' || object_name || ';' 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');
  • 46. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Components: Validation Check  Make sure all components are VALID before upgrade – Components are INVALID? – If that does not correct component status, further diagnosis might be required Select COMP_ID, COMP_NAME, STATUS, VERSION from DBA_REGISTRY where STATUS<>'VALID'; @?/rdbms/admin/utlrp.sql MOS Note:472937.1: Information On Installed Database Components MOS Note:753041.1: How to diagnose Components with NON VALID status 46Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 47. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Components: Mandatory Components  General recommendation: – Standardize the set of installed database components throughout your environment  XDB component is mandatory in Oracle Database 12c 47Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 48. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Components: Removal  Potential reasons to remove components: – A component does not exist anymore in Oracle Database 12c – Speed up the upgrade process – A component is obsolete – Further information on our Blog: EM Database Control Repository UltraSearch Rules Manager & Expression Filter OLAP AMD EM Database Control Repository EM Cloud Control http://tinyurl.com/ComponentCleanup 48Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 49. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance: Preserve Statistics  Gather accurate performance statistics from production – Accurate means: Starting at least 1 month before the upgrade – Use Automatic Workload Repository (AWR)  Snapshots interval 30-60 minutes and retention ~40 days  Extract AWR: SQL>  Performance snapshot comparison using AWR DIFF reports: SQL> – Please note: AWR usage requires a Diagnostic Pack license – Alternative: STATSPACK MOS Note:466350.1 and MOS Note1931103.1  MOS Note:1477599.1 Best Practices Around Data Collection For Performance Issues @?/rdbms/admin/awrextr.sql select * from table( DBMS_WORKLOAD_REPOSITORY.AWR_DIFF_REPORT_HTML(<DBID> , 1, 101, 121, <DBID>, 1, 201, 221)); 49Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 50. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 50 25% of +Terabyte Migrations get delayed or fail because of insufficient network hardware, setup or bandwidth Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 51. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance: Network Bandwidth Interface Net Data Volume Theoretical Transfer Throughput Real World Transfer Throughput 100 Mbit Ethernet 11 MB/sec 40 GB/hour <30 GB/hour 1 Gbit Ethernet 110 MB/sec 400 GB/hour <300 GB/hour 10 Gbit Ethernet 1100 MB/sec 4000 GB/hour <3000 GB/hour Infiniband IB 4xQDR 4000 MB/sec 14400 GB/hour <11000 GB/hour 51Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 52. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance: Network Strategies Issue Solution Amount of data not transferable?  Move historical data upfront  Use Data Guard or Turbo TTS All transfer types single threaded? Parallel scp, ftp, NFS ... Slow hardware? Parallel network cards, replacements Different network segments? Replace old switches/router or check for alternative routes or direct wiring External networks? Check upfront bandwidth over distance Still not enough bandwidth? Sneakernet: 52Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 53. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 faster performance  Can be run on selected data files or tablespaces only as well 53Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 54. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Preparation Checklist  In the TARGET environment:  Software Certification Information  Installation Requirements  Software and Patch Sets  CPUs, PSUs and Bundle Patches  Single Patches  Parameter Recommendations Checks Download Settings 54Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 55. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 55Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 56. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Software Download Base Release (and Oracle 12.1.0.2) Patch Sets, PSUs, Patches Oracle Software Cloud: http://edelivery.oracle.com/ Oracle Tech Network: http://otn.oracle.com/indexes/downloads/index.html My Oracle Support: http://support.oracle.com 56Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 57. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Database Standard Edition 12.1.0.2 SE2  Oracle Database 12c - Availability  http://tinyurl.com/12102SE2-download Upgrade, Migrate & Consolidate to Oracle Database 12c 57
  • 58. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Installation of the new Software  Install newest PATCH SET or base release (Every patch set is a full release since Oracle Database 11.2)  Apply newest available Patch Set Update (PSU) or Bundled Patch (BP)  Apply Interim Patches for known issues Patch Set / Base Release PSU / BP Patches  Now: Start the database upgrade/migration!!!Upgrade 58Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 59. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Overview of Database Patch Delivery Methods  MOS Note: 1962125.1 – Including testing recommendations Upgrade, Migrate & Consolidate to Oracle Database 12c 59
  • 60. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Testing Recommendations by Patch Type  MOS Note: 1962125.1 60Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 61. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Example: Patch Set 12.1.0.2  Download patch set 12.1.0.2 from http://support.oracle.com 61Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 62. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Patch Set Installation 11.2.0.4 / 12.1.0.2  Default: Out-of-place patch upgrade!!! It’s a full release!!! – If you specify an in-place patch upgrade: 62Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 63. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | In-place Patch Set Installation 11.2.0.4 / 12.1.0.2  Only way to do an in-place patch set installation – Example  Backup your /dbs and /network/admin files  ./runInstaller –detachHome ORACLE_HOME=<old-home>  Remove your previous-home contents  Install 11.2.0.4/12.1.0.2 into the previous home  Restore /dbs and /network/admin files  Upgrade your database with DBUA or catupgrd.sql/catctl.pl $ ./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. 63Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 64. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Unattended Installation/Configuration  Oracle 11.2 – see MOS 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 $OH  For further information (also OS related) see the Oracle Database Server Installation Master Note:1156586.1 64Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 65. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Unattended Installation/Configuration  Oracle Database 12c:   65Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 66. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Patching Notes by Release MOS Note:161818.1 » Click on the releases number « ? Oracle 11.2.0 MOS Note:880782.1 Known Issues and Alerts in 11.2.0.x » Click on "Availability and Known Issues" for your patch releases « MOS Note:1562139.1 Availability and Known Issues in 11.2.0.4 Check for: Recommended Patches Alerts Notable Fixes Issues Introduced MOS Note:756671.1 Recommended Database Patches ? Oracle 12.1.0 MOS Note:1565065.1 Known Issues and Alerts in 12.1.0.x » Click on "Availability and Known Issues" for your patch releases « MOS Note:1683799.1 Availability and Known Issues in 12.1.0.2 Check for: Recommended Patches Alerts Notable Fixes Issues Introduced MOS Note:756671.1 Recommended Database Patches 66Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 67. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Check for important alerts: MOS Note:161818.1 Important Alerts and One-Off-Patches? 67Upgrade, Migrate & Consolidate to Oracle Database 12c ‘click’
  • 68. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Information / Alerts  Known issues in 12.1.0.x? See MOS Note:1565065.1 ‘click’ 68Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 69. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Information / Alerts  Recommended Database Patches? See also: MOS Note:756671.1 69Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 70. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Recommended Patches: PSUs  Always install the latest PSU as soon as possible – Most important Notes: Note:854428.1: Introduction to Database PSU Note:1227443.1: PSU Known Issues – PSU contents: – PSU characteristics: – PSU schedule – 4x/year: SPUs Fixes for Critical Issues Fixes  Recertification Fixes  Configuration RAC Rolling Standby First 20-OCT-2015 / 19-Jan-2016 / 19-Apr-2016 / 19-Jul-2016 70Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 71. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Recommended Patches: PSUs  Check for installed PSUs and patches – PSU check: opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU' – Since Oracle Database 12c  DBMS_QOPATCH – Documentation: http://docs.oracle.com/cd/E16655_01/appdev.121/e17602/d_qopatch.htm#ARPLS74834 71Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 72. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Examples using DBMS_QOPATCH  Check the inventory:  Check if a specific patch got installed:  Get patch details: 72Upgrade, Migrate & Consolidate to Oracle Database 12c SQL> select xmltransform(DBMS_QOPATCH.GET_OPATCH_LSINVENTORY, DBMS_QOPATCH.GET_OPATCH_XSLT) from dual; SQL> select xmltransform(DBMS_QOPATCH.IS_PATCH_INSTALLED('19303936 '), DBMS_QOPATCH.GET_OPATCH_XSLT) from dual; Patch Information: 19303936: applied on 2015-02-20T11:32:11-09:00 SQL> select xmltransform(DBMS_QOPATCH.GET_OPATCH_LIST, DBMS_QOPATCH.GET_OPATCH_XSLT) from dual; Patch details: ...
  • 73. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Information / Alerts  Alerts and new issues with 12.1.0.2? MOS Note:1683799.1 73Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 74. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Information / Alerts  Alerts and new issues with 12.1.0.2? MOS Note:1683799.1 74Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 75. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade Information / Alerts  Alerts and new issues with 11.2.0.4? MOS Note:1562139.1 75Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 76. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Important Optimizer Issues and Fixes  Things to consider before upgrade to Oracle Database 12.1.0.2 to avoid Poor Performance or Wrong Results: MOS Note:2034610.1 – Things to consider before upgrade to Oracle Database 11.2.0.4 to avoid Poor Performance or Wrong Results: MOS Note:1645862.1 Things to consider before upgrade to Oracle Database 11.2.0.3 to avoid Poor Performance or Wrong Results: MOS Note:1392633.1 76Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 77. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Important SQL Plan Management Issues and Fixes  Patches to Consider for 12.1.0.2 to Avoid Problems with SQL Plan Management (SPM): MOS Note:2035898.1 – Patches to Consider for 11.2.0.4 to Avoid Problems with SQL Plan Management (SPM): MOS Note:2034706.1 Patches to Consider for 11.2.0.3 to Avoid Problems with SQL Plan Management (SPM): MOS Note: 1948958.1 77Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 78. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Important Optimizer Issues and Fixes – SPARC SOLARIS  Things to Consider to avoid RDBMS Performance problems on SPARC – For 12.1.0.2: MOS Note:1970525.1 – For 11.2.0.3 /11.2.0.4: MOS Note:1680269.1 78Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 79. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Recommended OS patches – Oracle Database 12c  MOS Note:1587357.1 Oracle Database 12.1 Installation and Configuration Requirements Quick Reference for AIX, HP-UX, Linux, Solaris and MS Windows OS Upgrade, Migrate & Consolidate to Oracle Database 12c 79
  • 80. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Patching for High Availability 80Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 81. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 1. Patch the Standby 2. Test Changes!!!! 3. Switchover Patch the Standby First Application Tier Data Guard  MOS Note:1265700.1 - Data Guard Standby-First Patch Apply Post Switchover Test 11.2.0.1 Upgrade, Migrate & Consolidate to Oracle Database 12c 81
  • 82. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Out-of-Place Patching DB Instance Apply Patches Patches Applied Reduce the Downtime Database Home Clone Home Cloned Database Home Upgrade, Migrate & Consolidate to Oracle Database 12c 82
  • 83. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Rolling Real Application Cluster Patching Zero Application Downtime  Zero downtime rolling patch upgrade across RACs  Patch support node-by-node in a rolling fashion Upgrade, Migrate & Consolidate to Oracle Database 12c 83
  • 84. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Online Patching aka Hot Patching  Zero downtime for some patches Patched Shared Library 1. Apply Shared Library 2. Map into text Area 3. Use new patched functions Notes:  Increases memory footprint  Patch offline on next downtime  P1 or diagnostic patches MOS Note:761111.1 RDBMS Online Patching Aka Hot Patching Upgrade, Migrate & Consolidate to Oracle Database 12c 84
  • 85. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 – MOS Note:216205.1 DB Init Parameters for EBS R11i – MOS Note:396009.1 DB Init Parameters for EBS R12 – Don't use OFE …  alter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.3'; 85Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 86. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Remove Outdated Parameters  Example: 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 _push_join_union_view = FALSE _push_join_predicate = FALSE _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‘ Upgrade time for ORDIM: 49minutes Remove all underscores and events Upgrade time for ORDIM: 7 minutes Factor x7 86Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 87. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Why do we give parameter recommendations?  June 6, 2012 https://www.pcworld.com/article/257045/6_5m_linkedin_passwords_posted_online_after_apparent_hack.html 87Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 88. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations SEC_CASE_SENSITIVE_LOGON Values: { TRUE | FALSE } Explanation: Enables or disables password case sensitivity Annotation: Deprecated since Oracle 12c Recommendation: Age out passwords having PASSWORD_VERSIONS<11G When recreated, passwords will get salted select USERNAME, PASSWORD_VERSIONS from DBA_USERS; USERNAME PASSWORD_VERSIONS ---------- ----------------- APP_USER 10G 11G 12C BOSS 10G 88Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 89. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations SQLNET.ALLOWED_LOGON_VERSION_SERVER Values: { 8 | 10 | 11 | 12 | 12a }  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 Explanation: Determines min. authentication protocol when connection to a DB Annotation: ORA-28040 or ORA-3134 when lower client tries to connect Recommendation: Set it to 12 in your sqlnet.ora file(s) if you don't connect with <10.2.0.5 clients 89Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 90. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations AUDIT_TRAIL Values: { none | os | db [, extended] | xml [, extended] } Explanation: Enables or disables database auditing Annotation:  AUD$ will be moved into SYS schema if OLS and/or DBV is installed  Run olspreupgrade.sql from the 12c home  http://docs.oracle.com/database/121/UPGRD/preup.htm#UPGRD60015  Unified Auditing is enabled by default in MIXED MODE in a new DB  http://docs.oracle.com/database/121/DBSEG/auditing.htm#DBSEG822  SQL> select VALUE from V$OPTION where PARAMETER='Unified Auditing';  To turn off default policies:  SQL> noaudit policy ORA_SECURECONFIG;  SQL> noaudit policy ORA_LOGON_FAILURES; Recommendation: Make sure AUDIT_TRAIL is set correctly:  NONE if you don't want to have traditional auditing on  Any other value depending on your auditing needs  For further information see: http://tinyurl.com/UnifiedAuditing 90Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 91. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations DEFERRED_SEGMENT_CREATION Values: { TRUE | FALSE } Explanation: New tables will not allocate segments until a row is inserted Annotation: Default is TRUE since Oracle Database 11.2  Tablespace must be locally managed  COMPATIBLE ≥ 11.2.0  Performance penalty when the first row is inserted  May cause contention issues using many Data Pump workers  See MOS Note 1216282.1 Recommendation: Set it to FALSE except for rare cases where an application creates a large number of empty tables with may never get used 91Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 92. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations JOB_QUEUE_PROCESSES Values: { 0 – 1000 } Explanation: Number of jobs being able to run concurrently in the database Annotation: Default is 1000 since Oracle Database 11.1  If set to 0 no recompilation will happen  Too high settings can cause issues during concurrent stats gathering (new in 11.2) Recommendation: Set it to number of physical/real CPU cores http://tinyurl.com/job-queue-processes 92Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 93. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations _DATAFILE_WRITE_ERRORS_CRASH_INSTANCE Values: { TRUE | FALSE } Explanation: An I/O write error to ANY data file will crash the instance Old behaviour (FALSE): 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 Annotation: Default behavior has changed since patch set 11.2.0.2 Change is documented in MOS Note: 7691270.8 Recommendation: Just be aware of this change 93Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 94. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations Upgrade, Migrate & Consolidate to Oracle Database 12c 94 MAX_STRING_SIZE Values: { STANDARD | EXTENDED }  STANDARD  Length limits prior to Oracle Database 12c apply  VARCHAR2/NVARCHAR2: 4000 bytes and RAW: 2000 bytes  EXTENDED  New 32767 byte limit applies  Requires COMPATIBLE ≥ 12.0.0 Explanation: Controls the maximum size of VARCHAR2, NVARCHAR2, and RAW data types Annotation: Change from STANDARD  EXTENDED is allowed, but no way back Database in UPGRADE mode: @?/rdbms/admin/utl32k.sql Recommendation: Evaluate carefully as data will be stored in LOBs http://docs.oracle.com/database/121/SQLRF/statements_3001.htm#i2181663
  • 95. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | New Parameters in Oracle Database 12c  Oracle Database 12.1.0.1 – 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  Oracle Database 12.1.0.2  –DBFIPS_140  –COMMON_USER_PREFIX  –DB_PERFORMANCE_PROFILE  –ENABLE_GOLDENGATE_REPLICATION (11.2.0.4 and 12.1.0.2)  –EXCLUDE_SEED_CDB_VIEW  –INMEMORY_CLAUSE_DEFAULT  –INMEMORY_FORCE  –INMEMORY_MAX_POPULATE_SERVERS  –INMEMORY_QUERY  –INMEMORY_SIZE  –INMEMORY_TRICKLE_REPOPULATE_SERVERS_PERCENT  –OPTIMIZER_INMEMORY_AWARE  –PDB_LOCKDOWN  –PDB_OS_CREDENTIAL 95Upgrade, Migrate & Consolidate to Oracle Database 12c http://tinyurl.com/Parameters12c
  • 96. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Deprecated and Obsolete Parameters in Oracle Database 12c  Oracle Database 12.1.0.1 – Deprecated:  sec_case_sensitive_logon – Obsolete:  _app_ctx_vers  _log_io_size  Oracle Database 12.1.0.2 – Deprecated: – Obsolete:  parallel_fault_tolerance_enabled 96Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 97. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 97Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 1 Database Upgrade
  • 98. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Direct Upgrade to Oracle Database 12c 98Upgrade, Migrate & Consolidate to Oracle Database 12c Oracle 9.2.0.8 Oracle 10.1.0.5 Oracle 10.2.0.5 Oracle 11.1.0.7 Oracle 11.2.0.2 Oracle 12.1.0.2 Oracle 9.2 (GA: Jul 2002) Oracle 10.1 (GA: Jan 2004) Oracle 10.2 (GA: Jul 2005) Oracle 11.1 (GA: Aug 2007) Oracle 11.2 (GA: Sep 2009) DIRECT11.2.0.2 DIRECT11.1.0.7 DIRECT10.2.0.5 11.2.0.29.2.0.8 11.2.0.210.1.0.5 Please note: This graph will apply to database upgrades only!
  • 99. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  preupgrd.sql  Executes pre-upgrade checks  Runs in source environment  Generates fixup scripts – preupgrade_fixups.sql – postupgrade_fixups.sql  MOS Note:884522.1 New Pre-Upgrade Script Upgrade SQL Automation Upgrade, Migrate & Consolidate to Oracle Database 12c 99
  • 100. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 40% Faster Upgrades in Oracle Database 12c Upgrade, Migrate & Consolidate to Oracle Database 12c 100
  • 101. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  catctl.pl  Runs database upgrade in parallel  Up to 40% faster upgrade  Used and proven by selected Oracle Database 11g global customers – Telco billing – >100 SAP systems – Large DWH New Parallel Upgrade Faster Upgrade – Less Downtime catctl.pl script3.sqlscript2.sqlscript1.sql script4.sql script5.sql script6.sql script6.sql script7.sql script8.sql script9.sql script10.sql script11.sql Upgrade, Migrate & Consolidate to Oracle Database 12c 101
  • 102. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Harald Stefan Leiter Datenbanken Payback GmbH “The new parallel upgrade script promises to drastically reduce downtime due to planned maintenance. We saw a 37% improvement over the previous upgrade process in our environment.” Upgrade, Migrate & Consolidate to Oracle Database 12c 102
  • 103. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | New Parallel Upgrade Faster Upgrade – Less Downtime $> $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql Upgrade, Migrate & Consolidate to Oracle Database 12c 103
  • 104. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Pre-Upgrade Automation  Parallel Upgrade  RMAN Integration  Guaranteed Restore Points  Activity and Alert Log Database Upgrade Assistant Simplified Upgrade Upgrade, Migrate & Consolidate to Oracle Database 12c 104
  • 105. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Daniel Overby Hansen Chief Software Developer, Environment Operation SimCorp A/S - Denmark “We experienced very few problems and in general the upgrades were very fast. We were able to upgrade almost all of our 200+ database instances to Database 12c with a downtime of only 30-40 minutes (and that includes some of the pre- and post-tasks). I have been upgrading Oracle databases since 9i to 10g, and this has been the best release (measured on how easy upgrading is) so far." Upgrade and Migrate to Oracle 12c - Live and Uncensored! 105
  • 106. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Mass Upgrades  Grid Infrastructure Upgrades  RAC Database Upgrades  Standby Database Upgrades  Licensed in Lifecycle Management Pack EM Cloud Control Enterprise Manager Mass and RAC Upgrades Upgrade, Migrate & Consolidate to Oracle Database 12c 106
  • 107. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Differences Upgrade to Oracle 11.2 vs Oracle 12c Upgrade to Oracle Database 11.2 Upgrade to Oracle Database 12c Preupgrade check: utlu112i.sql preupgrd.sql Status information: Limited Detailed with many recommendations Fixup scripts: No Yes – pre and post upgrade Upgrade script: catupgrd.sql catctl.pl Parallel: No Up to 8 parallel threads – default: 4 Error handling: No Any errors in the ORACLE SERVER upgrade will lead to status INVALID Upgrade, Migrate & Consolidate to Oracle Database 12c 107
  • 108. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Upgrade to Oracle Database 12c  Database upgrade including migration to a new server Oracle 10.2.0.5 RHEL4 – 32bit 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit 1TB 108Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 109. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 109Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 110. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 10.2.0.5 RHEL4 – 32bit  Installation of Oracle Database 12c Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit 110Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 111. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 10.2.0.5 RHEL4 – 32bit  PSU (MOS Note:756671.1) and patches (MOS Note:1565082.1) Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit 111Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 112. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Download/execute newest preupgrade scripts: MOS Note:884522.1 – preupgrd.sql and utluppkg.sql – Files can be found in Oracle 12c's ?/rdbms/admin as well Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit Oracle 10.2.0.5 RHEL4 – 32bit 112Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 113. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  preupgrd.sql generates 2 scripts and 1 log for review Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit $ORACLE_BASE/cfgtoollogs/<SID>/preupgrade - preupgrade.log - preupgrade_fixups.sql - postupgrade_fixups.sql Oracle 10.2.0.5 RHEL4 – 32bit 113Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 114. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Review preupgrade.log Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit Oracle 10.2.0.5 RHEL4 – 32bit 114Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 115. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  preupgrd.sql won't create output files if JAVAVM is: – Not present – Invalid – Option off Workaround: Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit $> cd $ORACLE_BASE/cfgtoollogs $> mkdir <DB_UNIQUE_NAME> $> cd <DB_UNIQUE_NAME> $> mkdir preupgrade Tracked as Bug14614756 – fixed in Oracle 12.1.0.2 Oracle 10.2.0.5 RHEL4 – 32bit 115Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 116. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Run preupgrade_fixups.sql Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit Oracle 10.2.0.5 RHEL4 – 32bit 116Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 117. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Execute suggested actions manually: Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit Oracle 10.2.0.5 RHEL4 – 32bit 117Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 118. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Optional manual actions: – Remove Enterprise Manager Database Control Repository  Otherwise it will be dropped during catuppst.sql execution Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit $> emctl stop dbconsole SQL> @?/rdbms/admin/emremove.sql Oracle 10.2.0.5 RHEL4 – 32bit 118Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 119. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Optional manual actions: – Essential step if OLS (Label Security) and/or DV (Database Vault) was already in the database prior to the upgrade  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 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit @?/rdbms/admin/olspreupgrade.sql Oracle 10.2.0.5 RHEL4 – 32bit 119Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 120. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Optional manual actions: – Remove Oracle UltraSearch before the upgrade  UltraSearch does not exist in Oracle Database 11.2 and onwards, and it will be uninstalled during the upgrade  Removing it before the upgrade might save 1-2 minutes upgrade downtime Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB 24 hrs Oracle 12.1.0.2 OL6 – 64bit SQL> @?/ultrasearch/admin/wk0deinst.sql SYS password "" Oracle 10.2.0.5 RHEL4 – 32bit 120Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 121. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Prepare new init.ora: 1TB Oracle 12.1.0.2 OL6 – 64bit Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 10.2.0.5 RHEL4 – 32bit 121Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 122. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Create a new password file (recommended): 1TB Oracle 12.1.0.2 OL6 – 64bit Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions $> cd $ORACLE_HOME/dbs $> orapwd file=orapwV102 password=<string> entries=15 format=12 force=yes 24 hrs Oracle 10.2.0.5 RHEL4 – 32bit 122Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 123. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Set the environment: 1TB Oracle 12.1.0.2 OL6 – 64bit Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 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 24 hrs Oracle 10.2.0.5 RHEL4 – 32bit 123Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 124. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 10.2.0.5 RHEL4 – 32bit  Listener configuration: – If clients older than Oracle 11g connect then you must set: SQLNET.ALLOWED_LOGON_VERSION_SERVER=10 in $ORACLE_HOME/network/admin/sqlnet.ora 1TB Oracle 12.1.0.2 OL6 – 64bit Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 124Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 125. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Restore & recover an RMAN Online Backup – Recreate TEMP tablespace  Alternative: Copy all relevant files to the new server – Data files, redo logs, control files. RMAN> run { SET ARCHIVELOG DESTINATION TO '/fra/tmprest'; RESTORE DATABASE; RECOVER DATABASE; } Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB Oracle 12.1.0.2 OL6 – 64bit 24 hrs 1TB Oracle 10.2.0.5 RHEL4 – 32bit 125Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 126. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Changing OS from 32bit  64bit – No action required as part of a (patch) upgrade!!! – Special case: Keep the database version (not an upgrade!)  OLAP must be reloaded with xumuts.plb – see MOS Note:352306.1 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB Oracle 10.2.0.5 OL5.6 – 64bit 1TB startup upgrade @?/rdbms/admin/utlirp.sql shutdown immediate startup upgrade @?/rdbms/admin/utlrp.sql Oracle 10.2.0.5 RHEL4 – 32bit 126Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 127. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 10.2.0.5 RHEL4 – 32bit  Start the database in STARTUP UPGRADE mode: Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 24 hrs 1TB 127Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 128. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  What happens during STARTUP UPGRADE mode? – Suppresses more than 20 expected error messages such as ORA-942 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 24 hrs 1TB 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 …) AQ Processes can not start in restrict mode Completed: ALTER DATABASE OPEN MIGRATE Oracle 10.2.0.5 RHEL4 – 32bit 128Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 129. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Upgrade duration to Oracle Database 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 – To less extent:  CPU cores and speed  IO throughput Component HH:MM:SS Oracle Server 00:16:17 JServer JAVA Virtual Machine 00:05:19 Oracle Workspace Manager 00:01:01 Oracle Enterprise Manager 00:10:13 Oracle XDK 00:00:48 Oracle Text 00:00:58 Oracle XML Database 00:04:09 Oracle Database Java Packages 00:00:33 Oracle Multimedia 00:07:43 Oracle Expression Filter 00:00:18 Oracle Rule Manager 00:00:12 Gathering Statistics 00:04:53 Total Upgrade Time: 00:52:31 Component HH:MM:SS Oracle Server 00:16:17 JServer JAVA Virtual Machine 00:05:19 Oracle XDK 00:00:48 Oracle Text 00:00:58 Oracle XML Database 00:04:09 Oracle Database Java Packages 00:00:33 Gathering Statistics 00:02:43 Total Upgrade Time: 00:30:47 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 129Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 130. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Speed up the upgrade – Fresh dictionary stats 24 hours before upgrade – Stats on XDB objects if XDB is in use – Process AUD$ info  MOS Note: 1329590.1 offers a script to populate missing entries  If auditing was/is on by accident: Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions exec DBMS_STATS.GATHER_DICTIONARY_STATS; exec DBMS_STATS.GATHER_TABLE_STATS(ownnam e=>'XDB', tabname=>'XDB$RESOURCE', estimate_percent=>NULL); truncate table SYS.AUD$ | SYSTEM.AUD$; 130Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 131. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Real World Case: Create dictionary statistics – 4th largest retailer worldwide  1.5 million synonyms  Oracle 9i  Oracle 11g Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 33% faster 0 50 100 150 200 250 300 350 400 Upgrade Upgrade without/with Dictionary Statistics Without Stats With Dict Stats Without Synonyms 131Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 132. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Real World Case: Preprocess audit records – Saudi Arabian banking customer's core system  Approximately 75M auditing records in AUD$ table Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 0,0 2,0 4,0 6,0 8,0 10,0 Upgrade Duration in hours 1,5 8,5 Without AUD$ preprocessing With AUD$ preprocessing 132Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 133. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 10.2.0.5 RHEL4 – 32bit  Run the upgrade with catctl.pl – Default: n=4 – Maximum: n=8 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 24 hrs Oracle 12.1.0.2 OL6 – 64bit 1TB 133Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 134. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Default location for catctl.pl log files – Current working directory  Recommendation: Use –l parameter to specify an alternate location – One log file for each parallel thread Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 24 hrs Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 134Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 135. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Restart the database in normal mode – Create an spfile from the startup init.ora now Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 135Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 136. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Recompilation with utlrp.sql – Call utlprp.sql directly to customize CPU usage  Most efficient value for n is 2x number of CPU cores – Gathering fixed objects stats may speed up recompilation Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS ; SQL> @utlprp n Oracle 10.2.0.5 RHEL4 – 32bit 24 hrs 136Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 137. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Monitoring of recompilation Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB 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_%'; Oracle 10.2.0.5 RHEL4 – 32bit 137Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 138. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  New status in DBA_REGISTRY for the SERVER component in case of any error before recompilation – Check REGISTRY$ERROR for error details – After recompiliation the status remains the same compared to previous releases Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB COMP_ID COMP_NAME VERSION STATUS -------- ---------------------- ----------- ---------- CATALOG Oracle Database Catalo 12.1.0.1.0 INVALID CATPROC Oracle Database Packa 12.1.0.1.0 INVALID JAVAVM JServer JAVA Virtual M 12.1.0.1.0 VALID CATJAVA Oracle Database Java P 12.1.0.1.0 VALID ... Oracle 10.2.0.5 RHEL4 – 32bit 138Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 139. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Execute postupgrade_fixups.sql Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 139Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 140. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Upgrade status check: utlu121s.sql Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 140Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 141. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Invalid objects check – utluiobj.sql – Manual check Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB SQL> select OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_INVALID_OBJECTS order by 1,2; Oracle 10.2.0.5 RHEL4 – 32bit 24 hrs 141Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 142. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Time zone adjustment – Why is this important? – Real World Example from 2012:  Why is the flight 1 hour shorter on Saturday?  Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 142Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 143. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  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 – Patch in MOS Note:412160.1 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 143Upgrade, Migrate & Consolidate to Oracle Database 12c Oracle Database Release Default Time Zone Version 10.2.0.3 – 11.1.0.7 DST V4 11.2.0.1 DST V11 11.2.0.2 - 11.2.0.4 DST V14 12.1.0.1, 12.1.0.2 DST V18 Most recent time zone file: DST V25
  • 144. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Time zone adjustment in Oracle 12c – script in: MOS Note:1509653.1 – For Oracle 11.2: MOS Note:977512.1 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB Database will be restarted! Oracle 10.2.0.5 RHEL4 – 32bit 144Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 145. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  RMAN Catalog Upgrade: – SQL> @$ORACLE_HOME/rdbms/admin/dbmsrmansys.sql – $ rman CATALOG my_catalog_owner@catdb recovery catalog database Password: RMAN> UPGRADE CATALOG; RMAN> UPGRADE CATALOG; RMAN> EXIT;  See: https://blogs.oracle.com/UPGRADE/entry/rman_catalog_upgrade_to_oracle – RMAN Catalog database needs now to be an EE with Partitioning Option (since 12.1.0.2) - MOS Note:1927265.1 Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 145Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 146. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 1TB Oracle 12.1.0.2 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 24 hrs 146Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 147. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 147Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 148. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 148Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 149. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 149Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 150. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 150Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 151. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 151Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 152. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 152Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 153. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 153Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 154. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Alternative without HW migration  DBUA: 154Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 155. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 1: Summary  Database upgrade including migration to a new server Install and patch Oracle 12c Preupgrade Checks Prepare Environment Restore Entire Database Upgrade Database Post Upgrade Actions 1TB Oracle 12.1.0.1 OL6 – 64bit 1TB Oracle 10.2.0.5 RHEL4 – 32bit 24 hrs 155Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 156. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | A small team and an excellent plan Upgrade 300 databases at Mobiliar Insurance, Switzerland Upgrade, Migrate & Consolidate to Oracle 12c 156
  • 157. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Swiss Mobiliar – Switzerland's most personal insurer – Founded 1826 in Bern, oldest Swiss insurance – Legal form:  Cooperative association (mutual company) – Over 1.7 million persons and firms insured – Switzerland's no.1 insurer for:  Businesses, term life insurances, households – 80 general agencies at 160 locations – Over 4,400 employees and 325 trainees – Awarded Most Trusted Insurance Brand in Switzerland for 13 consecutive years 157 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 158. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Upgrade 289 databases – Oracle Database 11.2.0.3 to Oracle Database 12.1.0.2 – 80 production databases  Oracle Cloud Control  AWR Warehouse (home-made)  Shell scripts  Oracle Restart with ASM  Oracle In Memory  OID 158 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 159. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Project timeline: 24 months – Goal: 18 months 159 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c 0 5 10 15 20 25 30 35 40 45 Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15 Migrations per month
  • 160. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Small DBA Team – Only 3.8 FTE + 1 newbie  2 major software releases of Mobiliar Applications per year resulting in a full month of code freeze  Bug fixing support for Oracle 11.2.0.3 ended Aug 27, 2015  Highly complex applications – Queries with more than 1000 bind variables and 250 outer joins  One core team member broke his leg in September 2015 and did not return to work yet 160 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 161. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  All queries, execution time and execution paths are tracked on a self made AWR Performance DWH  Possibility to compare performance before and after the upgrade on query level  Performance tests performed by application owner  Regression tests done during the testing phase of the Mobi Software Release – PSU RDBMS 12.1.0.2.4, PSU GRID 12.1.0.2.2 – Two Oracle Homes on the same server – Upgrade with catctl.pl embedded into home-built shell script 161 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 162. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Project Monitoring with Excel Sheet 162 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c 0 50 100 150 200 250 300 350 Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15 Jan-15 Feb-15 Mrz-15 Apr-15 Mai-15 Jun-15 Jul-15 Aug-15 Sep-15 Okt-15 Nov-15 Dez-15 DBs 12c 0 7 10 18 26 62 105 126 136 152 157 170 DBs 11g 289 282 279 271 263 227 184 163 153 137 132 119 Oracle Database Swiss Mobiliar DBs 11g DBs 12c
  • 163. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Automated upgrade via home-built scripts: 163 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 164. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Live? And alive? – Yes! First system went live on Feb 4, 2015 – Current status (Oct 12, 2015):  152 out of 289 databases live on Oracle Database 12.1.0.2  53% upgraded already  Project perfectly on schedule 164 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c 137 152 No. Databases Oracle. 11.2.0.3 Oracle 12.1.0.2
  • 165. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  No major issues after go live – Issues caught during testing, e.g.: – Bug 20776435: PARSE OF INMEMORY QUERY IS SPINNING ON CPU  Query with 250 Left Joins  Workaround: alter session set "_optimizer_inmemory_table_expansion"=false; – Bug 19677469: NO QUERY REWRITE  Workaround: CREATE MATERIALIZED VIEW …. SELECT /*+ MV_MERGE */ … or: alter system set "_fix_control"='10145667:OFF'; 165 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 166. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Oracle In-Memory boosts performance – Read on: http://tinyurl.com/Mobi12c 166 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 167. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint "The entire upgrade project of our 300 Oracle databases at Die Mobiliar is running very well. When we catch issues, we fix them before going live. And features such as Oracle In-Memory add a lot of performance boost to some of our applications. Especially the Oracle Upgrade Reference Program was a great help and added a lot of value to our project's progress. We are very happy and satisfied with the upgrade process and the reliability and performance of Oracle Database 12c". Paolo Kreth, Group Manager Databases, Die Mobiliar 167 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle 12c
  • 168. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 168Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 2 RAC & ASM Upgrade
  • 169. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 2: Upgrade RAC and move to ASM  RAC Database migration to a new cluster including upgrade Oracle 11.2.0.2 OEL5.8 4 hrs 5TB 5TB Oracle 12.1.0.2 OL6 169Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 170. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 2: Upgrade RAC and move to ASM  RAC Database migration to a new cluster including upgrade Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 4 hrs 5TB 5TB Oracle 12.1.0.2 OL6 Oracle 11.2.0.2 PHYSICAL STANDBY 170Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 171. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Use a Physical Standby for Hardware Migration  Fast and simple: Test it several times!  Does not require source release software on target hardware  Mixed Oracle Version support with Data Guard Redo Transport Services (Doc ID 785347.1)  Could include migration to RAC and/or ASM  Migrating to RAC using Data Guard (Doc ID 273015.1)  Works cross platform (same Endianness) in some cases  Data Guard Support for Heterogeneous Primary and Physical Standbys…(Doc ID 413484.1) Oracle 11.2.0.2 OEL5.8 4 hrs 5TB 5TB Oracle 12.1.0.2 OL6 Oracle 11.2.0.2 PHYSICAL STANDBY 171Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 172. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 2: Upgrade RAC and move to ASM  RMAN mixed platform support – Duplicate, restore and recovery  MOS Note:1079563.1  Only supported for: – DUPLICATE FROM ACTIVE DATABASE – Backup-based DUPLICATE using image copies or backup sets – RESTORE and RECOVER using image copies or backup sets  Bit change requires utlirp.sql to invalidate PL/SQL and code – Oracle 11.2.0.2 OEL5.8 4 hrs 5TB 5TB Oracle 12.1.0.2 OL6 172Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 173. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Grid Infrastructure installation – Always install/upgrade Oracle Clusterware first!  Install it into a new Grid Infrastructure home  GI version ≥ resources (ASM, RDBMS …) – Rule is valid until 4th digit – PSUs can differ and can be higher in e.g. DB Home Install GI and DB 12.1.0.1 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 4 hrs 5TB GI 12.1.0.2 OL6 173Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 174. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Oracle Home/Base – Grid Infrastructure should be in a different location than the database's ORACLE_BASE – Part of the GI home is owned by root once root.sh/rootupgrade.sh has been run – Windows: Remote Registry Service must be enabled – see: https://technet.microsoft.com/en-us/library/cc754820.aspx Grid Infrastructure Installation GI DB 174Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 175. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grid Upgrade Planning, Prep and Prereqs  ORAchk (formerly RACchk)  MOS Note:1268927.1  Cluvfy  MOS Note:316817.1  EXAchk  MOS Note:1070954.1  RAC Best Practice / Starter Kit Start here:  Generic: MOS Note: 810394.1 Then study the one for your platform(s):  Linux: MOS Note: 811306.1  Windows: MOS Note: 811271.1  AIX: MOS Note: 811293.1  HP-UX: MOS Note: 811303.1  SPARC Solaris: MOS Note: 811280.1  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! 175Upgrade, Migrate & Consolidate to Oracle Database 12c  Just in case: MOS Note: 759868.1- How to Convert RAC ASM/DB instances to non-RAC ASM/DB instances
  • 176. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | RAC Upgrade ORAchk Upgrade Readiness Assesment  Upgrade Readiness Assessment with ORAchk: MOS Note:1457357.1  Download the newest version of ORAchk: MOS Note:1268927.1 Upgrade, Migrate & Consolidate to Oracle Database 12c 176
  • 177. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | RAC Upgrade ORAchk Upgrade Readiness Assesment  Upgrade Readiness feature of ORAchk – Pre Upgrade  $> orachk -u -o pre – Post Upgrade  $> orachk -u -o post Upgrade, Migrate & Consolidate to Oracle Database 12c 177
  • 178. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | GI Home: Planning, Prep and Prereqs  11.2/12.1 GI 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) 178Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 179. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Since 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 SCAN: Planning, Prep and Prereqs 179Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 180. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  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 SCAN: Planning, Prep and Prereqs 180Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 181. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Top Level Flow: – Verify the hardware/software environment – Install the software – Configure the software – Finalize the upgrade Completing the Upgrade 181Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 182. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  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/12.1 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 Completing the Upgrade 182Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 183. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  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 Completing the Upgrade 183Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 184. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Addtional 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. Completing the Upgrade 184Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 185. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Grid Infrastructure 12.1.0.1 Upgrade  How to Upgrade to Oracle Grid Infrastructure 12c Release 1 – Oracle Grid Infrastructure Installation Guide  12c Grid Infrastructure Quick Reference: – MOS Note:1517182.1  Pre 12.1 Database Issues in 12c Grid Infrastructure Environment – MOS Note: 1568834.1  How to Upgrade to 12c Grid Infrastructure if OCR or Voting File is on Raw/Block Device – MOS Note:1572925.1 185Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 186. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grid Infrastructure Installation/Upgrade 186Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 187. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grid Infrastructure Installation/Upgrade This choice has been made obsolete in Oracle 12.1.0.2 as GIMR is mandatory 187Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 188. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | GIMR? MGMTDB?  Grid Infrastructure Management Repository – What is stored inside?  http://docs.oracle.com/database/121/CWADD/troubleshoot.htm#CWADD92242 – SID? –MGMTDB DBNAME? _MGMTDB – It is a single-tenant database (CDB with one PDB) since Oracle 12.1.0.2 – Previous installations of the GIMR will be deleted  The information can be preserved if necessary – OUI will choose automatically the first OCR disk group – GIMR will take roughly 750MB per day per node - default retention is 3 days – More details:  How to Handle the Oracle GIMR  https://blogs.oracle.com/UPGRADE/entry/grid_infrastructure_management_repository_gimr Upgrade, Migrate & Consolidate to Oracle Database 12c 188
  • 189. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grid Infrastructure Installation/Upgrade 189Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 190. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Grid Infrastructure Installation/Upgrade 190Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 191. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Clusterware - ASM - DB Compatibility  See MOS Note:337737.1 Clusterware ASM DB Certified 12.1 12.1 12.1 Y 12.1 12.1 11.2(a) Y 12.1 12.1 11.1(a) Y 12.1 12.1 10.2(a) Y 11.2 11.2(b) 11.2 Y 11.2 11.2(b) 11.1 Y 11.2 11.2(b) 10.2 Y Clusterware ASM DB Certified 11.1 11.1 11.1(c) Y 11.1 11.1 10.2 Y 11.1 11.1 10.1 Y 11.1 10.2 11.1 Y 11.1 10.2 10.2 Y 11.1 10.2 10.1 Y 11.1 10.1(d) 11.1 Y 11.1 10.1(d) 10.2 Y 11.1 10.1 10.1 Y 10.2 10.2 10.2 Y 10.2 10.2 10.1 Y 10.2 10.1(d) 10.2 Y 10.2 10.1 10.1 Y 10.1 10.1 10.1 Y 191Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 192. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Clusterware & ASM Upgrade  Documentation: – Oracle Clusterware Administration and Deployment Guide 12c http://docs.oracle.com/cd/E16655_01/rac.121/e17886/toc.htm  Grid Infrastructure Upgrade Known Issues: – Note: 948456.1: Pre 11.2 Database Issues in 11gR2 Grid Infrastructure  Oracle Clusterware rolling upgrade: – 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  Rolling ASM Upgrades: – http://docs.oracle.com/cd/E16655_01/install.121/e17888/procstop.htm#CWLIN524 192Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 193. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Grid Infrastructure Patch Sets – 11g only!!!  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 193Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 194. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle EXADATA 11.2.0.3/4 Patching – plus 10.2.0.x  For certification, recommendations, issues, current patches etc. see – MOS Note:888828.1 Database Machine and Exadata Storage Server 11.2 Supported Versions – MOS Note 1306814.1: Oracle Software Patching with OPLAN  Patch Upgrade from 11.2.0.1/11.2.0.2 to 11.2.0.3: – MOS Note:1373255.1 Database Upgrade on Exadata Database Machine to 11.2.0.3  MULTICAST is already setup correctly on a Database Machine V2  Patch Upgrade to 11.2.0.4: – MOS Note:1565291.1: 11.2.0.4 Grid Infrastructure and Database Upgrade for 11.2.0.2 BP12 and later – MOS Note:1555036.1: 11.2.0.4 Grid Infrastructure and Database Upgrade for 11.2.0.2 BP11 and earlier  Exadata and Oracle 10.2: – MOS Note:1965897.1 - Oracle Database 10g Release 2 Support on Exadata 194Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 195. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle EXADATA 12.1.0.2 Upgrade  MOS Note:1306791.2 Information Center: Oracle Exadata Database Machine  MOS Note:1364356.2 Information Center: Upgrading Oracle Exadata Database Machine  MOS Note:1681467.1 GI and Database Upgrade from 11.2.0.2-4, 12.1.0.1 to 12.1.0.2 on Exadata  MOS Note:1537407.1 Requirements and restrictions when using Oracle 12c on Exadata  MOS Note:1571789.1: Exadata Storage Software 12.1 – Smart Scan support on Exadata with Oracle Database 12c – IO Resource Manager works with 12c – also with Multitenant – Cell-to-cell data transfer for faster ASM resync, resilver, rebalance 195Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 196. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 11.2.0.1 OEL5.8 5TB  Database software installation: – Oracle Database 12.1.0.2  For recovery only there's no need to install Oracle Database 11.2.0.2 Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions 4 hrs Oracle 12.1.0.2 OL6 196Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 197. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Download/execute newest preupgrade scripts: MOS Note:884522.1 – preupgrd.sql and utluppkg.sql – Files can be found in Oracle 12c's ?/rdbms/admin as well Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 5TB Oracle 12.1.0.2 OL6 197Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 198. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle 11.2.0.2 OEL5.8  Prepare Storage for ASM: MOS Note 452924.1 – Raw disk – Logical unit numbers (LUNs) – Raw logical volumes (LVM) – not recommended – NFS and dNFS Volumes are supported - see and MOS: 1570073.1 and documentation: https://docs.oracle.com/cd/E11882_01/install.112/e47689/app_nas.htm#LADBI1372 Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions 4 hrs 5TB Oracle 12.1.0.2 OL6 198Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 199. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Configuring ASM with ASMCA 199Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 200. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Restore backup into ASM – see MOS Note:1617946.1 Oracle 11.2.0.2 OEL5.8 4 hrs 5TB Oracle 12.1.0.2 OL6 Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Source  11.2.0.2 Destination  12.1.0.2 (ASM) Make sure archive logging is on Switch on Force Logging Create identical trace file structure Create a password file with identical PW Adjust init.ora Adjust init.ora Adjust tnsnames.ora Adjust listener.ora and tnsnames.ora DUPLICATE FOR STANDBY FROM ACTIVE DATABASE Adjust controlfile names Switch on log transport Switch on managed recovery mode 5TB Oracle 11.2.0.2 PHYSICAL STANDBY 200Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 201. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Restore Backup into ASM – Before Oracle 11g  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;  Rename controlfiles and switch on log transport and recovery 201Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 202. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Stop on production Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 4 hrs 5TB Oracle 12.1.0.2 OL6 5TB Oracle 11.2.0.2 PHYSICAL STANDBY $ $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql SQL> @?/rdbms/admin/utlrp.sql  Final synchronization  Activate standby, and Upgrade it! 202Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 203. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 203Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 204. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Register resources to Clusterware  Advance ASM compatibility  Set CLUSTER_DATABASE to TRUE  Start the instances on all nodes Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 5TB Oracle 12.1.0.2 OL6 5TB 204Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 205. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  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>  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 (just if source was below 11g) – $> ocrconfig -add +data – $> ocrconfig -delete /dev/raw/raw1 – $> crsctl replace votedisk +VOTING  Set CLUSTER_DATABASE to TRUE and start the instances on all nodes Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions 205Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 206. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Important Notes and White Papers  TWP: Migration to Oracle ASM http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2- asmmigrationwithdg-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? 206Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 207. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 2: Summary  RAC Database migration to a new cluster including upgrade Install GI and DB 12.1.0.2 Preupgrade Checks Prepare Environment and ASM Restore Online Backup for Standby Activate and Upgrade Post Upgrade Actions Oracle 11.2.0.2 OEL5.8 5TB Oracle 12.1.0.2 OL6 5TB Oracle 11.2.0.2 PHYSICAL STANDBY 4 hrs 207Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 208. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Interhyp AG – Financial institution – HQ in Munich/Germany – Bank for residential and development financing – Banking service provider to other German key banks – 100% subsidiary of Dutch ING Bank 208 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 209. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Scope: – Upgrade 6x 2-node-RAC systems – Oracle 10.1.0.5  Oracle 11.2.0.2 with ASM  RH Linux 32bit  RH Linux 64bit  Hardware exchange for key systems: 2-node cluster  4-node cluster 209 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 210. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Constraints: – Downtime window: 4 hrs per database  Upgrade/migrations one after another – Network bandwidth not sufficient for Data Pump – LOBs in the source database 210 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 211. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Prepare new cluster – Install Oracle Grid Infrastructure 11.2 and patch it  Decrease upgrade duration to ~30 minutes – Remove unused components from production db 211 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 212. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Phyical standby as migration vehicle – Avoid copy downtime  Oracle 10.1.0.5  Oracle 10.1.0.5 within 11.2 ASM Note: This wasn’t officially certified, but will work in this case – Activate standby and upgrade it  Can be tested many times!! 212 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 213. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Upgrade – Activate standby and put into STARTUP UPGRADE  Invalidate and compile all packages/code (32bit  64bit!) – Post upgrade:  Register database to Clusterware  Move OCR/Voting into ASM 213 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 214. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Live? And alive? – Yes!!! Go Live: 27-NOV-2010 – Total downtime: ~2 hours – Database upgrade time:  24 minutes + 5 minutes recompilation – Very robust using the entire Oracle software stack 214 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 215. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Well ... the optimizer ... – We found some optimizer issues  Reports were affected  Remedy: Hints, rewrite and patches andSQL Profiles  Don't argue with Support when you have Exadata BP on a regular Linux RAC – MOS Note:1459365.1: Exadata Bundle Patches and Non-Exadata Systems 215 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 216. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 216Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 Data Pump Migration 3
  • 217. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 3: Cross Endianness Migration with Data Pump  Migration of a single instance database to Exadata Oracle 9.2.0.8 HP-UX Oracle 12.1.0.2 OL5.8 64bit 8TB8TB 24 hrs 217Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 218. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 3: Cross Endianness Migration  Basic 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 Oracle 9.2.0.8 HP-UX Oracle 12.1.0.2 OL5.8 64bit 8TB8TB 24 hrs 218Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 219. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 3: Cross Endianness Migration  Better options since Oracle 10g: – Data Pump expdp and impdp  Usually the first option to try – Cross platform Transportable Tablespaces (xTTS)  More complicated, more manual steps than pure Data Pump Oracle 9.2.0.8 HP-UX Oracle 11.2.0.4 OL5.8 64bit 8TB8TB Oracle 11.2.0.4 HP-UX 8TB SWING 24 hrs 219Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 220. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 Oracle 9.2.0.8 HP-UX Oracle 12.1.0.2 OL5.8 64bit 8TB8TB Oracle 11.2.0.4 HP-UX 8TB SWING 24 hrs 220Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 221. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 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 221Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 222. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Overview  Limitations – Not compatible with "old" exp/imp  Since Oracle 11.2: "Old" par files can be used legacy interface – 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:SECUREFILE 222Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 223. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Best Practices  For full exports: – Role EXP_FULL_DATABASE is required  For export consistency use: – FLASHBACK_SCN=<scn> – FLASHBACK_TIME=SYSTIMESTAMP alternative: – CONSISTENT=Y [since Oracle 11.2 – Legacy Interface]  This will increase UNDO requirements for the duration of the export  Always set parameters: – EXCLUDE=STATISTICS – METRICS=YES 223Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 224. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Best Practices Performance Tips  Use PARALLEL=n – Typically n = 2x <number of CPU cores>  EXCLUDE=STATISTICS on export  Enable parallel import of indexes: apply patch for bug 21539301 – Available for 11.2.0.4 and 12.1.0.2  New feature in 12c: TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y – Apply patch for bug 20778442 Upgrade, Migrate & Consolidate to Oracle Database 12c 224
  • 225. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Best Practices Network Mode  Direct import via database link – Parameter: NETWORK_LINK  Run only impdp on the target system - no expdp necessary  No dump file written, no disk I/O, no file transfer needed  Restrictions of database links apply: – Does not work with LONG/LONG RAW and certain object types  Performance: Depends on network bandwidth and target's CPUs Upgrade, Migrate & Consolidate to Oracle Database 12c 225 $ expdp ...
  • 226. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Best Practices Network Mode  Real World Case: Kaiser Permanente, Medicare (USA) – impdp on NETWORK_LINK with 8 vs 16 CPU cores  10GBit connection leveraged up to 8 Gbit  1 TB table copied in ~15 min  4 TB/hour – Network bandwidth and CPU bound Upgrade, Migrate & Consolidate to Oracle Database 12c 226
  • 227. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Filtering  Filtering is very powerful – If using EXCLUDE parameter, everything else is included – If using INCLUDE parameter, everything else is excluded – Can’t use EXCLUDE and INCLUDE in the same Data Pump job – Specify complete path or partial path  Objects matching the specified path will be excluded/included  Query to find exclude/include object types: – select unique seq_num, full_path from sys.datapump_paths where het_type = 'DATABASE_EXPORT' order by seq_num; – job_type: het_type: FULL DATABASE_EXPORT SCHEMA SCHEMA_EXPORT TABLE TABLE_EXPORT TRANSPORTABLE TRANSPORTABLE_EXPORT 227Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 228. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Filtering  EXCLUDE example expdp system/manager schema=hr exclude=statistics … vs expdp system/manager schema=hr exclude=SCHEMA_EXPORT/TABLE/STATISTICS select unique SEQ_NUM, FULL_PATH from SYS.DATAPUMP_PATHS where HET_TYPE = 'SCHEMA_EXPORT' AND FULL_PATH like '%STATISTICS%' order by SEQ_NUM; 77 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS 78 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS 221 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS 222 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP 223 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS 225 SCHEMA_EXPORT/TABLE/STATISTICS 226 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS 227 SCHEMA_EXPORT/TABLE/STATISTICS/USER_PREF_STATISTICS 228Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 229. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump Filtering  INCLUDE example: – Same results but includes everything with "table" in the path: – Includes the table definition only: – Some of the TABLE object paths impdp system/manager tables=hr.employees impdp system/manager schemas=hr include=table/table:"= 'EMPLOYEES'“ SCHEMA_EXPORT/TABLE/TABLE SCHEMA_EXPORT/TABLE/TABLE_DATA SCHEMA_EXPORT/TABLE/GRANT impdp system/manager schemas=hr include=table:"= 'EMPLOYEES'" 229Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 230. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump News in Oracle 12c  Full transportable export/import for an entire database  Support for multitenant container databases and pluggable databases  New … – VIEWS_AS_TABLES parameter  Lets you export the contents of a view as a table – TRANSFORM parameter options  TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y – Will disable archive logging during import for tables and/or indexes  TRANSFORM=LOB_STORAGE:SECUREFILE  TRANSFORM=STORAGE:N  TRANSFORM=TABLE_COMPRESSION:<compression_clause> – LOGTIME=[ NONE | STATUS | LOGFILE | ALL ] parameter  Will write timestamps on status and/or logfile messages 230Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 231. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump News in Oracle 12c  TRANSFORM option to enable Advanced/HCC Compression – Example:  TRANSFORM=TABLE_COMPRESSION:"compress for query high" – But: Granularity only on the entire import  Workarounds: – Precreate objects  Downside: Will slow down import!!! or: – Precreate the tablespace with COMPRESS option  create tablespace ARCHIGH datafile 'archigh.ora' size 100G default compress for archive high; – Then run Data Pump with TRANSFORM=TABLE_COMPRESSION:N  This will drop all embedded compression attributes associated with the tables  Now tablespace compression option will be used for all newly created tables 231Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 232. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Exporting Views as Tables TABLE1 VIEW1 expdp system/mgr views_as_tables=scott.view1 ... impdp system/mgr remap_table=view1:scott.table1 ... TABLE1 Upgrade, Migrate & Consolidate to Oracle Database 12c 232
  • 233. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | LOGTIME Parameter  Without vs With LOGTIME=ALL Upgrade, Migrate & Consolidate to Oracle Database 12c 233
  • 234. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enhanced Compression Algorithm  COMPRESSION_ALGORITHM – Defines the compression algorithm when compressing dump files  BASIC The same algorithm used in previous versions. Good compression, without severely impacting on performance  LOW : For use when reduced CPU utilization is a priority over compression ratio  MEDIUM: Recommended option. Similar characteristics to BASIC, but uses a different algorithm  HIGH: Maximum available compression, but more CPU intensive – Performance:  Compression ratio  CPU usage – Requires Advanced Compression Option license $ expdp scott/tiger tables=emp directory=mydir dumpfile=emp.dmp logfile=expdp_emp.log compression=all compression_algorithm=medium 234Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 235. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enhanced Compression Algorithm  Customer evaluation – BASIC at 3.5 TB/hour – MEDIUM at 7.0 TB/hour 2x 235Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 236. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Payback GmbH – Belongs to Loyalty Partner GmbH which belongs to American Express – HQ in Munich, Germany – Develops and operates professional customer loyalty programs based on customized IT solutions  Provider for Payback  Active in Germany, Poland, India, Italy, Mexico and USA 236 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 237. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Migrate 7TB / 1.5TB from HP-UX to Exadata V1 – Cross platform, cross Endianness, cross version  Oracle 9.2.0.7 on HP-UX  Oracle 11.1.0.7 on OL – 4 months planning and migration phase  August to November 2009 – Proposed go-live date  15-NOV-2009 237 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 238. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Move everything in less than 24 hrs  Network bottleneck – Remedy: Install extra InfiniBand hardware into HP box  ~ 3GB/sec throughput! 238 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 239. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Setup: 239 Customer Project Constraints Preparation Migration Success? Remarks Restore + Upgrade HP-UX PA-RISC HP-UX PA-RISC OL 64bit PROD SWING Prod Load Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 240. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Test migrations: 240 Customer Project Constraints Preparation Migration Success? Remarks HP-UX PA-RISC HP-UX PA-RISC OL 64bit PROD SWING Prod Load Data Pump on NETWORK_LINK INSERT APPEND on database links for tables >100 GB Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 241. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Parallel live loads: Performance tests 241 Customer Project Constraints Preparation Migration Success? Remarks Redirect the production load by apps servers HP-UX PA-RISC HP-UX PA-RISC OL 64bit PROD SWING Prod Load Prod Load Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 242. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Final test became LIVE migration 242 Customer Project Constraints Preparation Migration Success? Remarks HP-UX PA-RISC OL 64bit PROD HP-UX PA-RISC SWING Prod Load Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 243. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Live? And alive? – Yes! Go-live in early November 2009  Two weeks earlier than proposed – Total upgrade and migration time: ~20 hours  ~ 8 hours: Restore and recovery  ~ 1 hour: Database upgrade to Oracle 11.1.0.7  ~10 hours: Data migration to Exadata V1  ~ 1 hour: Smoke testing and final verification – Dramatic performance improvements  Job runtimes decreased by 80%  User complaints about too fast performance … really!! 243 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 244. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Not a single piece of SQL got changed!!! – Most critical job: runtime from 30 hrs to < 2hrs 244 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 245. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Same customer again … Payback GmbH 245 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 246. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Migrate 14TB from Exadata V1 to Exadata X2-2 – 2 months planning and migration phase  June to July 2012 – Proposed go-live date  22-JUL-2012 – MOS Note: 1055938.1 Migrating from HP Oracle Database Machine to Sun Oracle Database Machine 11.2 using Data Guard 246 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 247. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Database has grown from 7TB to 14TB  Downtime: less than 8 hrs  Network "bottleneck" – Remedy: Extra IB cabled connection from V1 to X2-2 247 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 248. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Restoring 14TB with RMAN – DUPLICATE FOR STANDBY FROM ACTIVE DATABASE  Removed unused components from the source database 248 Customer Project Constraints Preparation Upgrade Success? Remarks RMAN Restore 64 parallel channels InfiniBand cable Oracle 11.1.0.7 Oracle 11.1.0.7 Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 249. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Live upgrade/migration – RMAN Restore and Recovery: <3 hours  64 parallel RMAN channels allocated: >4TB/hour 249 Customer Project Constraints Preparation Upgrade Success? Remarks RMAN Restore 64 parallel channels Oracle 11.1.0.7 Oracle 11.1.0.7 InfiniBand cable Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 250. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Database upgrade 11.1.0.7  11.2.0.3 – Using the new PARALLEL UPGRADE* scripts  Total database upgrade time including recompilation and time zone change: 20 mins 250 Customer Project Constraints Preparation Upgrade Success? Remarks Oracle 11.1.0.7 Oracle 11.1.0.7 Oracle 11.2.0.3 * * Released for selected customers ollyInfiniBand cable Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 251. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Live? And alive? – Yes! Go-live on 3-JUL-2012  Almost three weeks earlier than proposed – Total migration and upgrade time: ~4 hours  < 3 hours: Restore for Standby and recovery  < 20 mins: Database upgrade to Oracle 11.2.0.3  ~ 40 mins: Extra tasks (crsctl etc.) – Significant performance improvements  Job runtimes decreased again by 30-60% 251 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 252. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  A few plans did change – but we were prepared  – Had captured all plans from AWR into an SQL Tuning Set – Remedied failing plans with SQL Plan Management 252 Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 253. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 253Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 Transportable Tablespaces 4
  • 254. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Concept Transportable Tablespaces 75TB 75TB Self Contained? Read Only expdp "'"sys/sys as sysdba"'" … TRANSPORT_TABLESPACES=TS1,TS2 … impdp "'"sys/sys as sysdba"'"… TRANSPORT_DATAFILES=… Read Write  TTS feature available since Oracle 8i  Cross platform support since Oracle 10g 254Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 255. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transportable Tablespaces Pros and Cons  Pro – Potentially very fast  Copying large files can be faster than exporting & importing everything  No need to rebuild indexes – Cross platform since Oracle 10g – Decrease copy/convert time by using RMAN Incremental Backups – Proven solutions for EBS and other apps available  Con – SYSTEM/SYSAUX can't be transported – Complexity is your enemy  Too many objects to rebuild – Views, synonyms, sequences … – Simple is better for fast TTS!!!  Too many objects in tablespaces slow down meta expdp/impdp – (Sub)partitions, partitioned indexes … Upgrade, Migrate & Consolidate to Oracle Database 12c 255
  • 256. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Workflow Upgrade, Migrate & Consolidate to Oracle Database 12c 256 Set all data table- spaces Read-Only Export meta tablespace contents Generate CREATE scripts Restore and convert datafile backups Precreate users in target database Import meta tablespace contents + Plug in Datafiles Execute CREATE scripts Set all data table- spaces Read-Write
  • 257. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Concept Transportable Tablespaces xTTS LITTLE ENDIAN PLATFORMS HP IA Open VMS HP Open VMS HP Tru64 UNIX Linux IA (32-bit) Linux IA (64-bit) Linux x86 64-bit Microsoft Windows IA (64-bit) Microsoft Windows x86 64-bit Microsoft Windows IA (32-bit) Solaris Operating System (x86) Solaris Operating System (x86-64) BIG ENDIAN PLATFORMS HP-UX (64-bit) HP-UX IA (64-bit) AIX-Based Systems (64-bit) IBM zSeries Based Linux IBM Power Based Linux Solaris[tm] OE (32-bit) Solaris[tm] OE (64-bit)  Cross platform support – V$TRANSPORTABLE_PLATFORM FILE COPY RMAN CONVERT FILE COPY 257Upgrade, Migrate & Consolidate to Oracle Database 12c DBMS_FILE_ TRANSFER
  • 258. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Concept Transportable Tablespaces xTTS  TTS cross platform – RMAN creates a file copy – Can be done on source or target system  Use the faster storage – Takes approximately the same amount of time as a backup and requires staging space – Multiple channels can be used – Example: – DBMS_FILE_TRANSFER converts implicitly and does not require staging but is generally slower RMAN> CONVERT TABLESPACE users,example TO PLATFORM 'Linux IA (32-bit)' FORMAT='/stage/transport_linux/%U'; 258Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 259. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade/Migration: Transportable Tablespaces DESTINATION Database 12.1.0.2 SYSTEM SYSAUX UNDO TEMP SCOTT HUGO VIEWS CODE PRIVS SOURCE Database 11.2.0.4 SYSTEM SYSAUX UNDO TEMP SCOTT HUGO VIEWS CODE PRIVS Read Only Rebuild meta information (views, synonyms, trigger, roles etc) Upgrade, Migrate & Consolidate to Oracle Database 12c 259
  • 260. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Possible options  Moving meta information – The “brute force” approach  Data Pump – The “smart” approach  DBMS_METADATA expdp/impdp CONTENT=METADATA_ONLY SELECT DBMS_METADATA.GET_DDL('SYNONYM', SYNONYM_NAME, OWNER) FROM all_synonyms where owner='PUBLIC' and table_owner not in ('SYS'); 260Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 261. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transportable Tablespaces  Avoid physical file copies when possible – Use a physical standby as your transporter – Mount from two sides  Tablespaces can be mounted from two databases at the same time as long as they are set read-only  Take special care on: – Time zone versions must be equal prior to transport  Otherwise Data Pump will block the meta import – Be careful with starting values for sequences STANDBY TTS PHYS TTS PHYS STANDBY 261Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 262. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Fuji Xerox Singapore – Headquartered in Tokyo, locations throughout the Asia-Pacific region – Global leader in document services and communications – Over ¥1 trillion annual revenue – 45,000+ employees Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 262
  • 263. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Upgrade and migrate Oracle E-Business Suite database and applications – Multi-language environment 3TB RAC1 RAC2 RAC3 RAC4 3TB 11i Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 263
  • 264. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Database hosts information from multiple countries in a single EBS instance – Includes nine different alphabets  OS and Endian Conversion  Coordination of EBS and DB upgrades and patching  Single 1Gbit network card on source system  No testing impact on PROD allowed  Initial migration testing showed 7+ days of downtime Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 264
  • 265. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Database Migration Options exp/imp: too slow Data Pump, xTTS: requires 10g or newer Decision: upgrade DB, then use xTTS  Test plan – Multiple test runs to understand and tune the process – Copy of production environment to avoid any impact on business operations during testing  Worked with third-party SI, Oracle ACS and Oracle Development early in the process Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 265
  • 266. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Detailed migration planningCustomer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 266
  • 267. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Addressed network speed issues – Reduced file copy time from 9 hours to 4 hours  Added network cards to source system (total 4 x 1Gbit)  Parallel scripts to copy data files from source to target  Identified and applied helpful patches on source and target systems  Tuned parameters and parallelism for EBS upgrade  Analyzed and tuned post-upgrade performance on target system Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 267
  • 268. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint 1. Install target environment 2. Upgrade source DB to 11g on Solaris 3. Migrate across platform using xTTS 4. Upgrade EBS to R12 on Exadata Cross-platform Transportable Tablespaces Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 268
  • 269. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  YES: went live in Spring 2013  Some EBS actions required or desirable prior to the DB upgrade – E.g. Patch to improve performance on the DR$PENDING table  Just a few post-upgrade DB tuning steps needed – Re-registered services to fix load imbalance in RAC – Found and fixed a few recommended parameter settings that had been missed  And some EBS tuning as well – Increased number of JVM to accommodate more users – Modified Forms OC4J Container values to improve navigation Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 269
  • 270. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Database upgrade is often only part of the project  The more current your source version, the less work is involved in an upgrade or migration  Tune your application, not just your database! Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 270
  • 271. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  One of the top 5 banks in the world – Based in North America – Businesses include consumer banking, credit cards, asset management, business finance, investment banking… – Over $2 trillion in assets, more than $100 Billion in annual revenue – 240,000 employees in 60 countries Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 271
  • 272. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  70+ TB to migrate and upgrade Current Configuration New Configuration CPUs 16 single-core 4 x 8-core Operating System Endian Big Little File System Veritas CFS, SFRAC 4.1 Veritas CFS, SFRAC 5.1 Disk Group 1 per DB 3-4 per DB Database size 70+ TB 70+TB Database Version Oracle 10.2.0.4 Oracle 11.2.0.2 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 272
  • 273. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Endian conversion – Both OS- and database-level endian conversions needed  Data synchronization – Up to the minute before conversion  Conversion Window – Migration and basic testing: 48 hours  Size & Scale of data – 70+ TB, millions of sub-partitions, extremely active OLTP system Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 273
  • 274. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Explore Data Movement Options  Copying 70TB over the 10Gb network = ~20 hours  And it doesn’t include DB cross-endian conversion! – Customer decision:  Use already licensed Veritas Portable Data Containers  Turbo TTS was not available yet – No need to license 3rd party software anymore!  Explore Database Conversion Options – Many options evaluated – Customer decision:  Cross-Platform Transportable Tablespaces Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 274
  • 275. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Migration Weekend: Met plan almost exactly! Duration Action 3 hours Graceful application shutdown, backup 6 hours Instantiate and validate DB on swing server 6 hours Data Pump metadata export 1 hours OS-level endian conversion 20 hours RMAN CONVERT processing 8 hours Data Pump metadata import 5 hours Post-migration tasks (TNSNAMES, re-create dblinks, etc.) 2 hours Post-migration validation & smoke testing 35 hours Migrate 70+ TB cross-endian!!! 51 hours Total time Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 275
  • 276. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  YES ...just a couple of post-upgrade tweaks: – Wrong job_queue_processes setting blocked parallel recompilation  Remedy: Set it to a value greater than 0 starting in 11.2 – High MUTEX contention after upgrade  Remedy: Apply newest PSU – it had all the fixes!!! Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 276
  • 277. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Expect the unexpected -- especially things you don‘t control! In this case... – Windows security group decided to roll out new security profiles on migration weekend – Upgrade weekend delayed by US debt ceiling negotiations – …what will happen during your big migration?  Does it really need to be said? Test!!! Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 277
  • 278. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Speed Up Transportable Tablespaces  Usually the biggest pain points with TTS – Downtime due to:  Duration to copy very large amounts of data  Duration to convert many tablespaces cross Endianness  New technique: Avoid the copy & convert phase – RMAN can convert incremental backups cross platform  Available since Oracle 11.2.0.3 for Exadata only  Available for Linux x86-64 with Oracle 11.2.0.4  Available on all platforms starting with Oracle 12c  See MOS Note:1389592.1 for description and Linux PERL scripts 278Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 279. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | The biggest pain points of TTS? • Copy and convert a large database • Rebuild all the meta information Upgrade, Migrate & Consolidate to Oracle Database 12c 279
  • 280. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | TTS Pain Points  Size – Solution: RMAN Incremental Backups  PERL scripts in MOS Note:1389592.1 and in MOS Note: 2005729.1  Source: 10.2.0.3 or newer  Target: 11.2.0.4 or newer  Complexity – Solution: Full Transportable Export/Import  Data Pump feature allows One Command Migration  Source: 11.2.0.3 or newer  Target: 12.1.0.1 or newer Upgrade, Migrate & Consolidate to Oracle Database 12c 280 Can be combined
  • 281. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Pure Transportable Tablespace with Incremental Backups DESTINATION Database 12.1.0.2 SCOTT HUGO SOURCE Database 11.2.0.4 VIEWS CODE PRIVS SCOTT HUGO SYSTEM SYSAUX UNDO TEMP SYSTEM SYSAUX UNDO TEMP VIEWS CODE PRIVS Data Pump Convert and apply backups Read Only expdp "'"sys/sys as sysdba"'" … TRANSPORT_TABLESPACES=TS1,TS2 … impdp "'"sys/sys as sysdba"'"… TRANSPORT_DATAFILES=… Downtime!!! Read Write Upgrade, Migrate & Consolidate to Oracle Database 12c 281
  • 282. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Full Transportable Export/Import in 3 Steps 282    Copy the datafiles or Restore/Merge Inc Backups Data Pump "One Command Migration" Create a new database or PDB Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 283. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Full Transportable Export/Import with Copies DESTINATION Database 12.1.0.2 SCOTT HUGO SOURCE Database 11.2.0.4 VIEWS CODE PRIVS SCOTT HUGO SYSTEM SYSAUX UNDO TEMP SYSTEM SYSAUX UNDO TEMP VIEWS CODE PRIVS Data Pump Read Only Upgrade, Migrate & Consolidate to Oracle Database 12c 283
  • 284. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Full Transportable Export/Import with Backups DESTINATION Database 12.1.0.2 SCOTT HUGO SOURCE Database 11.2.0.4 VIEWS CODE PRIVS SCOTT HUGO SYSTEM SYSAUX UNDO TEMP SYSTEM SYSAUX UNDO TEMP VIEWS CODE PRIVS Data Pump Convert and apply backups Read Only Upgrade, Migrate & Consolidate to Oracle Database 12c 284
  • 285. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Let's do it Full Transportable Export/Import using RMAN Incremental Rolled Foward Backups Upgrade, Migrate & Consolidate to Oracle Database 12c 285
  • 286. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Overview - Phases  Phase 1 - Initial Setup phase  Phase 2 - Prepare phase  Phase 3 - Roll Forward phase  Phase 4 - Final Incremental Backup  Phase 5 - Transport Phase: Import all Metadata  Phase 6 - Validate the Transported Tablespaces  Phase 7 - Cleanup Upgrade, Migrate & Consolidate to Oracle Database 12c 286
  • 287. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 1 - Initial Setup phase  Download the PERL scripts from MOS Note:1389592.1 – Key scripts: – Extract them to: /home/oracle/xtt Upgrade, Migrate & Consolidate to Oracle Database 12c 287
  • 288. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 1 - Initial Setup phase  Choose the best method – RMAN backup / convert  Faster  Requires staging space for CONVERT  xttdriver.pl -p and -c – DBMS_FILE_TRANSFER  Slower  Does not require staging space  CONVERT happens implicitly  xttdriver.pl -S and -G Upgrade, Migrate & Consolidate to Oracle Database 12c 288 Staging Backup Convert Restore & Convert
  • 289. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 1 - Initial Setup phase  Create a destination database – For Full Transportable Export/Import:  SourceDB must be 11.2.0.3 or higher  DestDB must be 12.1. – COMPATIBLE equal or higher – Identical database character sets – Identical national characher sets – Identical time zone versions Upgrade, Migrate & Consolidate to Oracle Database 12c 289 Oracle Database Release Default Time Zone Version 10.2.0.3, 10.2.0.4, 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, 11.2.0.4 DST V14 12.1.0.1, 12.1.0.2 DST V18 Most recent interim patch: See MOS Note:412160.1 DST V24
  • 290. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 1 - Initial Setup phase  Identify tablespaces to be transported  Configure: Upgrade, Migrate & Consolidate to Oracle Database 12c 290 xtt.properties ## Tablespaces to transport ## ======================== tablespaces=TS1,TS2 ## Source database platform ID ## =========================== platformid=13 ## Source system file locations ## ============================ ## Location where datafile copies are created ## during the "-p prepare" step. dfcopydir=/oracle/DQ1/rman_stage ## backupformat ## ------------ ## Location where incremental backups are created. backupformat=/oracle/DQ1/rman_stage ## Destination system file locations ## ================================= ## Location where datafile copies are placed by the user ## when they are transferred manually from souce system. stageondest=/oracle/DQ1/rman_stage ## storageondest ## ------------- ## Location where the converted datafile copies will be ## written during the "-c conversion of datafiles" step. ## This is the final location of the datafiles ## where they will be used by the destination database. storageondest=/oracle/DQ1/sapdata50 ## backupondest ## ------------ ## Location where converted incremental backups ## on the destination system will be written during ## the "-r roll forward datafiles" step. backupondest=/oracle/DQ1/rman_stage_incr
  • 291. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 1 - Initial Setup phase  Enable block change tracking in source database ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '<name>' REUSE;  Copy all xtt-scripts to the destination host  Set TMPDIR=/home/oracle/xtt on both hosts Upgrade, Migrate & Consolidate to Oracle Database 12c 291 Copy xtt scripts including modified xtt.properties /home/oracle/xtt /home/oracle/xtt
  • 292. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 2 - Prepare phase  Create data file copies on source – [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –p – Creates the following files used later:  xttplan.txt  rmanconvert.cmd Upgrade, Migrate & Consolidate to Oracle Database 12c 292 Staging
  • 293. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 2 - Prepare phase  Transfer files to destination host – Not necessary if your staging location is available to the destination host (NFS etc) – xtt.properties: dfcopydir = stageondest Upgrade, Migrate & Consolidate to Oracle Database 12c 293 Staging
  • 294. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 2 - Prepare phase  Copy rmanconvert.cmd to destination  Convert the data file copies and write them to storageondest – [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –c Upgrade, Migrate & Consolidate to Oracle Database 12c 294 Copy rmanconvert.cmd /home/oracle/xtt Staging C C
  • 295. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 3 - Roll Forward phase  Create incremental backups on source – [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i – Creates the following files used later:  tsbkupmap.txt  incrbackups.txt [not necessary here due to NFS mount] Upgrade, Migrate & Consolidate to Oracle Database 12c 295 Staging i i
  • 296. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 3 - Roll Forward phase  Transfer incremental backups to destination host – Not necessary if your staging location is available to the destination host (NFS etc) – xtt.properties: backupformat= stageondest Upgrade, Migrate & Consolidate to Oracle Database 12c 296 Staging i i
  • 297. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 3 - Roll Forward phase  Copy xttplan.txt and tsbkupmap.txt to destination  Convert the inc backups and merge them into tablespace files on storageondest – [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –r Upgrade, Migrate & Consolidate to Oracle Database 12c 297 Copy tsbkupmap.txt /home/oracle/xtt Staging xttplan.txt iC iC iC iC
  • 298. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 3 - Roll Forward phase  Record FROM_SCN on source for next incremental backup – [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -s – Writes it into xttplan.txt Upgrade, Migrate & Consolidate to Oracle Database 12c 298 Staging xttplan.txt SCN
  • 299. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 3 - Roll Forward phase  Repeat entire Phase 3 as often as necessary – Increase of frequency will decrease file sizes Upgrade, Migrate & Consolidate to Oracle Database 12c 299 Staging
  • 300. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 4 - Final Incremental Backup  Set tablespaces read/only – Downtime! – SQL:SOURCEDB> alter tablespace TS1 read only; SQL:SOURCEDB> alter tablespace TS2 read only; Upgrade, Migrate & Consolidate to Oracle Database 12c 300 Staging Read Only Read Only
  • 301. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 4 - Final Incremental Backup  Create final incremental backup on source – [oracle@source]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i Upgrade, Migrate & Consolidate to Oracle Database 12c 301 Staging i i Read Only Read Only
  • 302. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 4 - Final Incremental Backup  Copy xttplan.txt and tsbkupmap.txt to destination  Convert final inc backups and merge them into tablespace files – [oracle@dest]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl –r Upgrade, Migrate & Consolidate to Oracle Database 12c 302 Copy tsbkupmap.txt /home/oracle/xtt Staging xttplan.txt Read Only Read Only iC iC iC iC
  • 303. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Link Phase 5 - Transport Phase: Import all Metadata  Prepare destination database for Full Transportable Export/Import – SQL:DESTDB> CREATE DIRECTORY ftex_dir AS '/home/oracle/dp'; – SQL:DESTDB> GRANT READ, WRITE ON DIRECTORY ftex_dir TO mike; – SQL:DESTDB> CREATE PUBLIC DATABASE LINK v112 USING 'v112'; Upgrade, Migrate & Consolidate to Oracle Database 12c 303 iRead Only Read Only
  • 304. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Link Phase 5 - Transport Phase: Import all Metadata  Start Full Transportable Export/Import – [oracle@dest]$ impdp mike/passwd@v121 NETWORK_LINK=v112 FULL=Y TRANSPORTABLE=ALWAYS [VERSION=12] METRICS=Y EXCLUDE=STATISTICS LOGTIME=ALL LOGFILE=ftex_dir:v112fullimp.log TRANSPORT_DATAFILES='/oracle/DQ1/sapdata50/ts1.dbf' TRANSPORT_DATAFILES='/oracle/DQ1/sapdata50/ts2.dbf' Upgrade, Migrate & Consolidate to Oracle Database 12c 304 iRead Only Read Only impdp FULL=Y TRANSPORTABLE=ALWAYS
  • 305. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 6 - Validate the Transported Tablespaces  Validate transported tablespaces – RMAN> validate tablespace TS1, TS2 check logical; Upgrade, Migrate & Consolidate to Oracle Database 12c 305 Read Only Read Only RMAN>
  • 306. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Phase 7 - Cleanup  Set tablespaces on source read/write  Cleanup all files created for this process  Cleanup staging area if not done already Upgrade, Migrate & Consolidate to Oracle Database 12c 306
  • 307. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Yes, we made it  It looks a bit complicated at first sight but once you tried it, it may be the game changer Upgrade, Migrate & Consolidate to Oracle Database 12c 307
  • 308. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Documentation and Information  Transportable Tablespaces – Information – MOS Note:1166564.1 Master Note for Transportable Tablespaces Common Questions and Issues – MOS Note:1454872.1 Transportable Tablespace Restrictions and Limitations: Details, Reference, and Version Where Applicable – For TTS White Papers see the MAA webpage: http://www.oracle.com/technetwork/database/features/availability/oracle-database-maa- best-practices-155386.html – Database Upgrades using TTS: http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-upgradetts- 132620.pdf – Platform Migration using Transportable Database (RMAN): http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2- platformmigrationtdb-131164.pdf – Customer example: Amadeus Customer Case http://www.oracle.com/technetwork/database/features/availability/s281209-amadeus- 130978.pdf 308Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 309. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | EBS Upgrades  Resources for EBS – MOS Note:1581549.1 Best Practices for Minimizing Oracle E-Business Suite Release 12 Upgrade Downtime  Oracle recommends that you upgrade to the latest Database version certified for your EBS release – MOS  Certifications  E-Business Suite  <version>  <platform>  Then select the latest certified database release 309Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 310. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 310Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 Zero Downtime5
  • 311. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 5: Near-Zero Downtime  Platform migration with near-zero downtime Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 311Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 312. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Introduction  True ZERO Downtime is about more than the database – Oracle TimesTen In-Memory Database can do that – Oracle GoldenGate can deliver zero operational downtime depending on the application  Replication technologies are easier to handle and setup – A limited downtime will occur to switch clients/application  Active/active scenarios are possible depending on the application and usage scenario  Concept:  Technologies: – Oracle GoldenGate  NOTE: Oracle Streams is deprecated as of Oracle Database 12c Capture Source Move/Upgrade Database Destination Apply Destination Synch? Source  Destination 312Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 313. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate  Paid option of the database – Migratable license for 1 year which includes Active Data Guard  Works with many Oracle database versions – GoldenGate 12.1 supports Oracle ≥ 11.1.0.6  GoldenGate 11.2 supports Oracle ≥ 10.2.0.4 – For earlier database versions (8i (DML only), 9i-11.1) use GoldenGate 10.4  Oracle GoldenGate Installation and Setup Guide  Also works with non-Oracle databases (DB2, Teradata …)  GoldenGate White Paper: Zero Downtime Upgrade with OGG http://www.oracle.com/technetwork/middleware/goldengate/overview/ggzerodowntimedatabaseupgrades-174928.pdf 313Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 314. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Is your database ready for Oracle GoldenGate?  Complete Database Profile OGG readiness check – MOS Note:1298562.1: Oracle GoldenGate database Complete Database Profile check script for Oracle DB (All Schemas) Classic Extract  Check OGG readiness for Schema Only – MOS Note: 1296168.1 Oracle GoldenGate database Schema Profile check script for Oracle DB  314Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 315. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 5: Near-Zero Downtime  Platform migration with near-zero downtime Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 315Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 316. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Capture Capture: committed transactions are captured (and can be filtered) as they occur by reading the transaction logs Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 316Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 317. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Capture Trail: stages and queues data for routing Trail Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 317Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 318. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Capture Trail Build up the target database using: - Transportable Tablespaces x-Platform - Export/Import with Data Pump Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 318Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 319. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Capture Trail Pump: distributes data for routing to target(s) Pump Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 319Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 320. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Route: data is compressed, encrypted for routing to target(s) Capture Trail Pump Trail Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 320Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 321. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism Delivery: applies data with transaction integrity, transforming the data as required Capture Trail Pump Trail Delivery Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB 321Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 322. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Start Capture Mechanism Build Up Database Copy with Data Pump or TTS Start Apply Mechanism GoldenGate works bidirectionally - from higher to lower release as well! Capture Trail Pump Trail Delivery Oracle 10.2.0.3 HP-UX Itanium <5 mins 10TB Oracle 12.1.0.2 OL5.8 64bit 10TB Bi-directional 322Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 323. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 323 Migration with GoldenGate Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 324. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Amadeus is a leading transaction processor for the global travel and tourism industry DISTRIBUTION BUSINESS IT SOLUTIONS 711 airlines 110,000+ hotel properties 30 car rental companies 50+ cruise and ferry lines 207 tour operators 24 insurance companies 95 railways Inventory Departure Control e-Commerce Airlines Airports Hotels Rail 20,000+ tx/sec (peak) < 0.3 sec response time 10 Petabytes of storage 3+ million net bookings/day > 1 billion tx/day Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 324
  • 325. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Migrate Oracle 10g production databases to Oracle 11g on new HW and/or OS platform Source Target Oracle 10.2.0.3 RAC HPUX v2 Oracle 11.2.0.2/3 RAC HPUX v3 Oracle 11.2.0.2/3 RAC RHE Linux Oracle 10.2.0.3 Single Instance HPUX v2 Oracle 11.2.0.2/3 RAC One RHE Linux Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 325
  • 326. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Fixed quarterly outage windows  Maximum of 5 minutes database downtime  No service impact outside the outage window  Endian change: HP-UX  to Linux (big  little endian)  Possibility of fallback during and after the outage  High volume of DB changes (redo of up to 20MB/sec)  Large database sizes (up to 14TB)  Possibility for physical re-organization - Fresh data dictionary - Tablespace and partitioning redesign Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 326
  • 327. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  In-depth proof of concept (supported by Oracle) – Focusing on functional aspects – Focusing on data volume  Standardized migration process model with timeline  Home-made scripts and procedures to support setup, monitoring, tuning and switch over  Training of in-house specialist supporting the DBAs Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 327
  • 328. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Comparison of source/target DB content (Veridata)  Rehearsals of switch over and fallback  Switch over: Stop replication / Start reverse-replication  Instantiation of new 11g database: expdp from Physical Standby  Installation, configuration, tuning of GG replication Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 328
  • 329. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  15 databases successfully migrated, so far (Oct 2012)  Switchover duration: 2-6 minutes  No fallback performed Source Target Migrated Oracle 10.2.0.3 RAC HPUX v2 Oracle 11.2.0.2/3 RAC HPUX v3 6 Oracle 11.2.0.2/3 RAC RHE Linux 3 Oracle 10.2.0.3 Single Instance HPUX v2 Oracle 11.2.0.2/3 RAC One RHE Linux 6 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 329
  • 330. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  The concept proved to handle a smooth and secure migration across different DB versions and HW/OS platforms  To be considered …  Instantiation of target database (incl. Plan Stability)  Customized GG setup per database  Handling of unsupported data types (e.g. ANYDATA)  Impact of supplemental logging on source DB  Effort of tuning GG for DBs with high DML rate (e.g. parallel replicate processes) Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 330
  • 331. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 331Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 Rolling Upgrade6
  • 332. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 6: Real Rolling Upgrade  Rolling database upgrade with less than 5 min downtime Oracle 11.1.0.7 OL5.6 64bit <5 mins 5TB Oracle 12.1.0.2 OL5.8 64bit 5TB 332Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 333. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Case 6: Real Rolling Upgrade  Rolling database upgrade with less than 5 min downtime Create a Physical Standby Convert  Logical Standby Upgrade Logical Standby Switchover PROD Logical Flashback Logical Convert  Physical Upgrade via Redo Apply Switchover PROD  Physical Oracle 11.1.0.7 OL5.6 64bit <5 mins 5TB 5TB Oracle 11.1.0.7 PHYSICAL STANDBY Oracle 11.1.0.7 LOGICAL STANDBY Oracle 11.2.0.4 LOGICAL STANDBY Oracle 12.1.0.2 OL6 64bit 333Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 334. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Basic Facts and Information  Different types of standby databases Physical Standby Logical Standby Transient Standby Standby Type Block identical copy of PROD Logical copy of PROD Physical, converted temporarily into Logical – and return Apply Technique Redo Apply SQL Apply Redo and SQL Apply Build Up RMAN DUPLICATE Convert from Physical RMAN Duplicate, then Convert Switchover < 1 min Seconds Seconds + < 1 min 334Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 335. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transient Logical Standby  Concept: – Build up a Physical Standby database – Convert the Physical Standby into a Logical Standby – Upgrade the Logical Standby database – Switchover – Standby will be production system now – Then: Flashback the former production database – Convert it into a Physical Standby – Upgrade just by log apply – Eventually: Switchover to the original setup  Works pretty straight forward with Oracle Database 11g – Will work with Oracle Database 10g as well but requires more steps 335Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 336. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transient Logical Standby - Workflow 336 LSTBYPSTBY Guaranteed Restore Point  PROD synchronize Logminer Build KEEP IDENTITY  synchronize  PROD SWITCHOVER FLASHBACK DATABASE TO ...  PSTBY synchronize =UPGRADE  LSTBY New $OH + Upgrade  CONVERT TO PHYSICAL New $OH  PROD PSTBY SWITCHOVER  Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 337. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transient Logical Standby – White Paper  Transient Upgrade Concept: http://www.oracle.com/technetwork/database/features/availability/maa-wp- 11g-transientlogicalrollingu-1-131927.pdf  Shell scripts in Note:949322.1 for automation: http://www.oracle.com/technetwork/database/features/availability/maa-wp- 11g-upgrades-made-easy-131972.pdf 337Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 338. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBMS_ROLLING  Data Guard Simple Rolling Upgrade – Semi-automation of Transient Logical Standby Rolling Upgrade – Works with Data Guard Broker – Procedure DBMS_ROLLING – Usable for maintenance tasks beginning with Oracle 12.1.0.1 – Usable for upgrades beginning with the first patch set of Oracle 12c  DBMS_ROLLING usage will require a license for Active Data Guard  INIT_PLAN  DESTROY_PLAN  BUILD_PLAN  SET_PARAMETER  START_PLAN  SWITCHOVER  FINISH_PLAN  ROLLBACK_PLAN 338Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 339. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBMS_ROLLING - Planning & Setup Phase  Generate an upgrade plan – Call DBMS_ROLLING.INIT_PLAN  Generates an upgrade plan with a configuration specific set of instructions to guide the administrator through the upgrade process – Call DBMS_ROLLING.SET_PARAMETER  Modify parameters of the rolling upgrade  Prepare your changes to the database 339Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 340. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBMS_ROLLING – Execution Phase  Start the Execution Phase – Call DBMS_ROLLING.START_PLAN  Configures primary and standby databases participating in the upgrade  Make changes to the standby database – Upgrade time  Role exchange – Call DBMS_ROLLING.SWITCHOVER  Swaps roles between current primary and new primary with the changes, switchover is only downtime required 340Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 341. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBMS_ROLLING – End Phase  Finish the Rolling Upgrade – Call DBMS_ROLLING.FINISH_PLAN  Completes upgrade of the old primary and bystanders and resynchronizes with the new primary 341Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 342. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Nippon Steal & Sumitomo Metal - Factory System Benefits Business Objectives • High availability • DB Infra consolidation Solution • Adopting Exadata providing high performance and high availability • Rolling upgrade using Data Guard minimizes planned downtime “Consolidating 4 Databases including Steal factory systems onto Exadata providing High performance and reliability, Enabling making use of High Quality of infrastructure.” Minimize planned Downtime High performance Consolidation of database DB-A DB-B DB-C DB-D DB-A (standby) DB-B (standby) DB-C (standby) DB-D (standby) DB-A (test) DB-B (test) DB-C (test) DB-D (test) Monitored by EM12c & ASR Manager X3-2 Eighth (production) X3-2 Eighth (Standby /Dev/ Test) Data Guard (Physical/ Transient Logical) • Rolling upgrade using Transient Logical Standby realized minimizing downtime of upgrading DB (11.2.0.311.2.0.4) • 5 minutes downtime x 2times (switchover) per 1 DB • Mainframe migration • Consolidating 4 DBs including Steal factory system & DWH onto Exadata 5 minutes 342Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 343. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 343 Speed up the upgrade with Transient Standby Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 344. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Bielefeld University, Germany – Mid size university in Germany – 18,000 students and 1,600 employees – IT lead for 33 German universities Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 344
  • 345. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Goal: – Decrease patching downtime to less than 5 minutes  Stage 1: – Upgrade/migrate 10 key DBs from Oracle 9.2 to Oracle 11g  Single Instance  RAC, ASM, Data Guard  Stage 2: – Rolling upgrade from Oracle 11.1.0.6 to 11.1.0.7 Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 345
  • 346. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  Less then 5 minutes downtime – Database patch set and release upgrade  No downtime – Clusterware and ASM upgrades and PSUs Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 346
  • 347. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Stage 1: – Several test migrations and upgrades – Similar test system to the production Oracle/SUN Solaris cluster, including test standby system – Setup Oracle Grid Control – Performance monitoring with SPA – Tuning with SQL Tuning/Access Advisor  Stage 2: – Test the rolling upgrade with Transient Standby Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 347
  • 348. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 348
  • 349. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Yes  – Friday, February 13/14, 2009:  Transient Standby for the database upgrade from Oracle Database 11.1.0.6 to 11.1.0.7  2 minutes overall downtime  OOW 2009 presentation – July 30, 2012:  Rolling upgrade from Oracle Clusterware/ASM 11.1.0.7 to Oracle Grid Infrastructure 11.2.0.3 with ASM without any downtime  Rolling upgrade with OPatch apply -minimize_downtime for July 2012 PSU with no downtime Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 349
  • 350. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  The XDB component was INVALID before the upgrade – Logminer was not willing to extract logs – Lesson learned: Make sure all components in DBA_REGISTRY are VALID  Further information: – Database Rolling Upgrade Using Transient Logical Standby http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-transientlogicalrollingu-1-131927.pdf – Database Rolling Upgrades Made Easy by Using a Data Guard Physical Standby Database http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-upgrades-made-easy-131972.pdf Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 350
  • 351. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 351Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 7 Consolidate
  • 352. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 352 Plug into Oracle Multitenant Upgrade, Migrate & Consolidate to Oracle Database 12c 1 2 3 4 Overview Plug in Upgrade Working Reality5
  • 353. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | What is Single Tenant? What is Multitenant? This will be answered within the upcoming 45 minutes Upgrade, Migrate & Consolidate to Oracle Database 12c 353
  • 354. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Three possible database deployments in Oracle 12c  Stand Alone  Single Tenant – One active PDB  Multitenant – Up to 252 active PDBs Upgrade, Migrate & Consolidate to Oracle Database 12c 354 CDB$ROOT PDB$ SEED PDB1 CDB$ROOT PDB$ SEED PDB1 PDB1 ... DB
  • 355. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Three possible database deployments in Oracle 12c  Stand Alone – Same as in previous releases  Single Tenant – No extra license required – Possible with SE and EE  Multitenant – Requires Multitenant license – Requires Enterprise Edition Upgrade, Migrate & Consolidate to Oracle Database 12c 355 CDB$ROOT PDB$ SEED PDB1 CDB$ROOT PDB$ SEED PDB1 PDB1 ... DB
  • 356. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Some well-known concepts will change  >200 pages new documentation in the Administrator’s Guide – https://docs.oracle.com/database/121/ADMIN/part_cdb.htm#BGBIDDFD  Oracle Multitenant Overview WP – http://www.oracle.com/technetwork/database/multitenant-wp-12c-1949736.pdf Upgrade, Migrate & Consolidate to Oracle Database 12c 356
  • 357. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Why you must play with Oracle Single/Multitenant  Oracle Database 12c non-CDB works as expected  You don't have to use Oracle Multitenant – But … https://docs.oracle.com/database/121/UPGRD/deprecated.htm#BABDBCJI Upgrade, Migrate & Consolidate to Oracle Database 12c 357
  • 358. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Single/Multitenant – Concepts CDB1_SIN PDB$ SEED CDB2_SIN PDB$ SEED PDB1 PDB1 Upgrade, Migrate & Consolidate to Oracle Database 12c 358 CDB1_MUL PDB$ SEED CDB2_MUL PDB$ SEED PDB1 PDB2 PDB3 PDB1
  • 359. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Single/Multitenant – Sharing Resources CDB PDB$ SEED PDB1 PDB2 PDB3 Redo Control Flashbackspfile Upgrade, Migrate & Consolidate to Oracle Database 12c 359
  • 360. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | New Container Database – DBCA vs. Scripts Upgrade, Migrate & Consolidate to Oracle Database 12c 360 Create a new Container Database Create a new Pluggable Database or Plugin an Oracle 12c Database
  • 361. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | DBCA: Create a container database  All options will be created Upgrade, Migrate & Consolidate to Oracle Database 12c 361
  • 362. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Scripts: Create a container database  Create a Custom Database in DBCA  Scripts Only  Command Line – Subset of options possible  MOS Note: 2001512.1 Creating a CDB with a Subset of Options Upgrade, Migrate & Consolidate to Oracle Database 12c 362
  • 363. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Scripts: Create a container database  Subset of Database Options?  See: – MOS Note: 2001512.1 Creating a CDB with a subset of options – MOS Note: 1616554.1 Customization of Database Options in a Multitenant Setup  Scripts to edit: – CreateDBCatalog.sql  Remove Workspace Manager (owminst.plb) – <SID>.sql  Remove all unwanted components  Be aware of dependencies Upgrade, Migrate & Consolidate to Oracle Database 12c 363
  • 364. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Run SQL scripts with catcon.pl  Administrative scripts have to be started via catcon.pl: – Most useful catcon.pl options:  -u Username and optionally password  -d Directory containing the script to execute (default: current directory)  -e Echo on  -s Spools the output of every script  -l Directory to write logfiles into (default: current directory)  -b Base name for logfiles (mandatory option)  -c Containers in which to run sql scripts  -f Ignore PDBs which are closed – See MOS Note: 1932340.1 - How to execute sql scripts in Multitenant environment (catcon.pl) $> $ORACLE_HOME/perl/bin/perl catcon.pl -u SYS -d $ORACLE_HOME/rdbms/admin –e -s -b create_dictionary catcdb.sql Upgrade, Migrate & Consolidate to Oracle Database 12c 364
  • 365. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Example catcon.pl  Run the preupgrd.sql in all containers  -n Parallel degree – undocumented  -d Directory containing the script to execute  -l Directory to write logfiles into  -b Base name for logfiles (mandatory option) Upgrade, Migrate & Consolidate to Oracle Database 12c 365 $> $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -d $ORACLE_HOME/rdbms/admin -l /home/oracle/upgrade -b preupgrd preupgrd.sql
  • 366. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CDB-PDB: Who's who? CDB$ROOT PDB$SEED OBJ$ TAB$ SOURCE$ PDB1 EMP DEPT OBJ$ TAB$ SOURCE$ Upgrade, Migrate & Consolidate to Oracle Database 12c 366 PDB2 EMP DEPT OBJ$ TAB$ SOURCE$  Data dictionary and objects
  • 367. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CDB-PDB: Who's who?  Common user (common_user_prefix)  Local user Upgrade, Migrate & Consolidate to Oracle Database 12c 367 CDB$ ROOT PDB$SEED PDB1 PDB2 HUGO SCOTT HUGO SCOTT SYS C##ADMC##BOSS
  • 368. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CDB-PDB: Who's who?  Tablespaces Upgrade, Migrate & Consolidate to Oracle Database 12c 368 CDB$ROOT PDB$SEED PDB1 PDB2 SYSTEM SYSAUX TEMP UNDO SYSTEM SYSAUX SYSTEM SYSAUX DATA1 DATA2 TEMP SYSTEM SYSAUX DATA1 DATA2 TEMP
  • 369. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Footprint on Disk – Single Tenant  Each container has its own SYSTEM tablespace  Each container has its own SYSAUX tablespace  CDB$ROOT and PDB have their own TEMP tablespaces Upgrade, Migrate & Consolidate to Oracle Database 12c 369 CDB$ROOT PDB$ SEED PDB1 SYSTEM SYSAUX TEMP SYSTEM SYSAUX USERS TEMPSYSTEM SYSAUX USERSUNDO
  • 370. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 370 Plug into Oracle Multitenant Upgrade, Migrate & Consolidate to Oracle Database 12c 1 2 3 4 Overview Plug in Upgrade Working Reality5
  • 371. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Creation of a New Pluggable Database  Fast provisioning from PDB$SEED – PDB_FILE_NAME_CONVERT CDB PDB$ SEED PDB1 create pluggable database PDB1 admin user adm1 identified by pwd file_name_convert=( '/oradata/CDB2/pdbseed', '/oradata/CDB2/pdb1') i m p d p  Transport with TTS or FTEX  Import data with impdp – Dump file or NETWORK_LINK – imp for ≤ Oracle 9i Upgrade, Migrate & Consolidate to Oracle Database 12c 371
  • 372. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Cloning of a Pluggable Database  Fast cloning of a PDB – Local*: * not available with Single Tenant – Remote:  @CDB1 specifies a database link!!!  In Oracle 12.1 the source PDB must be quiesced CDB1 PDB$ SEED CDB2 PDB$ SEED PDB1 PDB2 PDB1 create pluggable database PDB2 from PDB1; create pluggable database PDB1 from PDB1@CDB1; Upgrade, Migrate & Consolidate to Oracle Database 12c 372
  • 373. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Cloning of a Pluggable Database  Also supported: – Snapshot cloning with ACFS, ZFS and NetApp  CREATE PLUGGABLE DATABASE pdb2 FROM pdb1 SNAPSHOT COPY;  Since Oracle Database 12.1.0.2 – Subset Cloning  CREATE PLUGGABLE DATABASE pdb2 FROM pdb1 FILE_NAME_CONVERT=('..','/..') USER_TABLESPACES=('data1', 'data2'); – Metadata Cloning  CREATE PLUGGABLE DATABASE pdb2 FROM pdb1 FILE_NAME_CONVERT=('..','/..') NO DATA; CDB1 PDB$ SEED CDB2 PDB$ SEED PDB1 PDB2 PDB1 Upgrade, Migrate & Consolidate to Oracle Database 12c 373
  • 374. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade and Plugin as PDB  Database upgrade CDB PDB$ SEED PDB1 exec DBMS_PDB.DESCRIBE('PDB1.xml'); DB1 create pluggable database PDB1 using ('PDB1.xml') nocopy tempfile reuse; start ?/rdbms/admin/noncdb_to_pdb.sql PDB1 xml Read Only Upgrade, Migrate & Consolidate to Oracle Database 12c 374  Start database read-only  Create XML description file  Shutdown database  Plugin database  Sanity operations
  • 375. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | noncdb_to_pdb.sql  Sanity script when pluging in a stand-alone database  Irreversible  Runs only once in the life of a database  Runtime depends ... Upgrade, Migrate & Consolidate to Oracle Database 12c 375
  • 376. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Full Transportable Export/Import  Create a fresh database/PDB CDB PDB$ SEED PDB1 DB1 Database Link impdp oow/passwd@PDB1 NETWORK_LINK=DB1 VERSION=12 FULL=Y TRANSPORTABLE=ALWAYS METRICS=Y LOGFILE=oow_dir:src112fullimp.log TRANSPORT_DATAFILES='/oradata/ts1.dbf' … Read Only impdp  Create database link to source  Tablespaces read-only – downtime!  Copy datafiles to destination  Run impdp on NETWORK_LINK Upgrade, Migrate & Consolidate to Oracle Database 12c 376
  • 377. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 377 Plug into Oracle Single-/Multitenant 1 2 3 4 Overview Plug in Upgrade Working Reality How Oracle Single/Multitenant will change a DBA's life 5
  • 378. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Why does a PDB require an upgrade?  Each PDB has its own Data Dictionary – The documentation states:  Comparing OBJ$ in CDB$ROOT versus PDB How Oracle Single/Multitenant will change a DBA's life 378
  • 379. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: Two Strategies  Everything at once  Unplug/plugin/upgrade How Oracle Single/Multitenant will change a DBA's life 379 CDB1 – Oracle 12.1.0.1 PDB$ SEED CDB2 – Oracle 12.1.0.2 PDB$ SEED PDB1 PDB1 PDB1 xml CDB1 – Oracle 12.1.0.2 PDB$ SEED PDB1 CDB1 – Oracle 12.1.0.1 PDB$ SEED PDB1 UPGRADE UPGRADE UPGRADE UPGRADE
  • 380. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: Everything at once  2 upgrade cycles – Cycle 1: CDB$ROOT – Cycle 2: PDB$SEED and PDB  Execute all scripts with catcon.pl How Oracle Single/Multitenant will change a DBA's life 380 CDB1 – Oracle 12.1.0.2 PDB$ SEED PDB1 CDB1 – Oracle 12.1.0.1 PDB$ SEED PDB1 UPGRADE UPGRADE UPGRADE
  • 381. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: Everything at once  Overview description - detailled steps can be found at: https://blogs.oracle.com/UPGRADE/entry/upgrade_pdbs_everything_at_once1  Source: – Copy new preupgrd.sql and utluppkg.sql into source' $OH/rdbms/admin – $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -d $ORACLE_HOME/rdbms/admin -l /home/oracle/mike -b preupgrd preupgrd.sql – ALTER PLUGGABLE DATABASE ALL OPEN; – $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 - d $ORACLE_HOME/cfgtoollogs/cdbupgr/preupgrade -l /home/oracle/mike -b preupgrade_fixups preupgrade_fixups.sql  Destination: – STARTUP UPGRADE – ALTER PLUGGABLE DATABASE ALL OPEN UPGRADE; – cd $ORACLE_HOME/rdbms/admin – $ORACLE_HOME/perl/bin/perl catctl.pl -d $ORACLE_HOME/rdbms/admin -n 16 -M -l /home/oracle/mike catupgrd.sql  The important file with timings per PDB for a quick check is called upg_summary.log and can be found in: $ORACLE_HOME/cfgtoollogs/<SID>/upgrade/upg_summary.log – STARTUP – ALTER PLUGGABLE DATABASE ALL OPEN; – $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 - d $ORACLE_HOME/cfgtoollogs/cdbupgr/preupgrade -l /home/oracle/mike -b postupgrade_fixups postupgrade_fixups.sql – $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp. – How Oracle Single/Multitenant will change a DBA's life 381
  • 382. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: Unplug/plug/upgrade  1 upgrade cycle – PDB only  With or without catcon.pl  You must take a backup immediately after upgrade!!! How Oracle Single/Multitenant will change a DBA's life 382 CDB1 – Oracle 12.1.0.1 PDB$ SEED CDB2 – Oracle 12.1.0.2 PDB$ SEED PDB1 PDB1 PDB1 xml UPGRADE
  • 383. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: One/many at a time – Step by Step – 1/2  In CDB1:  alter session set container=PDB1;  @?/rdbms/admin/preupgrd.sql  @/u01/app/oracle/cfgtoollogs/CDB1/ preupgrade/preupgrade_fixups.sql  exec dbms_stats.gather_dictionary_stats;  alter sesstion set container=CDB$ROOT;  alter pluggable database PDB1 close;  alter pluggable database PDB1 unplug into '/stage/pdb1.xml';  drop pluggable database PDB1 keep datafiles;  exit  Detailled steps: https://blogs.oracle.com/UPGRADE/entry/upgrade_pdbs_one_at_a CDB1 – Oracle 12.1.0.1 PDB$ SEED CDB2 – Oracle 12.1.0.2 PDB$ SEED PDB1 PDB1 PDB1 xml UPGRADE How Oracle Single/Multitenant will change a DBA's life 383
  • 384. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade: One/many at a time – Step by Step – 2/2  In CDB2: In SQL*Plus: – alter session set container=CDB$ROOT; – * create pluggable database pdb1 using '/stage/pdb1.xml' file_name_convert=( '/oradata/CDB1/pdb1', '/oradata/CDB2/pdb1'); – alter pluggable database PDB1 open upgrade; – #exit On the command prompt: – $> cd $ORACLE_HOME/rdbms/admin – $> $ORACLE_HOME/perl/bin/perl catctl.pl –c "PDB1" catupgrd.sql Back in SQL*Plus: – alter session set container=pdb1; – startup – @?/rdbms/admin/utlrp.sql CDB1 – Oracle 12.1.0.1 PDB$ SEED CDB2 – Oracle 12.1.0.2 PDB$ SEED PDB1 PDB1 PDB1 xml UPGRADE * A Plug-In-Check can be done before this step – but it will always result in "NO" as COMPATIBLE=12.1.0.2 per default in every Oracle 12.1.0.2 database when created with the DBCA How Oracle Single/Multitenant will change a DBA's life 384
  • 385. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Two Strategies – Pros and Cons? How Oracle Single/Multitenant will change a DBA's life 385 CDB1 – Oracle 12.1.0.1 PDB$ SEED CDB2 – Oracle 12.1.0.2 PDB$ SEED PDB1 PDB1 PDB1 xml CDB1 – Oracle 12.1.0.2 PDB$ SEED PDB1 CDB1 – Oracle 12.1.0.1 PDB$ SEED PDB1 UPGRADE UPGRADE UPGRADE UPGRADE  Unplug/plugin/upgrade – Can use catcon.pl – Only one upgrade – More manual steps – New CDB required (resources?)  Everything at once – Fewer steps – Keep name/SID – catcon.pl must be used – 3 database upgrades in 2 upgrade cycles
  • 386. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Downgrade – Simplified Description  Works for CDB/PDB entirely as well as for single/multiple PDBs  Manual tasks – catdwgrd.sql in current environemt – catrelod.sql in previous environment – Don't change COMPATIBLE  Datapatch must roll back SPUs/PSUs/BPs manually How Oracle Single/Multitenant will change a DBA's life 386
  • 387. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 387 Plug into Oracle Single-/Multitenant 1 2 3 4 Overview Plug in Upgrade Working Reality How Oracle Single/Multitenant will change a DBA's life 5
  • 388. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Startup – SAVE the STATE  You need to startup a PDB – ALTER PLUGGABLE DATABASE pdb1 OPEN;  By default PDBs need to be started manually – ALTER PLUGGABLE DATABASE pdb1 SAVE STATE;  This preserves the last state of a PDB – ALTER PLUGGABLE DATABASE pdb1 DISCARD STATE;  This removes any state preservation How Oracle Single/Multitenant will change a DBA's life 388
  • 389. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | CON_ID - The Important Differentiator How Oracle Single/Multitenant will change a DBA's life 389 CON_ID ~1000 CDB views
  • 390. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Character Sets in Oracle Multitenant  Only 1 common character set  Conversion required? – DMU 2.0 can convert character sets before or after plug-in CDB PDB$ SEED PDB1 DB1 How Oracle Single/Multitenant will change a DBA's life 390
  • 391. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameters in a PDB  Over 180 parameters can be adjusted per single PDB – SPFILE: Parameters valid for all containers – V$SYSTEM_PARAMETER: Parameters valid within a PDB CDB PDB$ SEED PDB1 How Oracle Single/Multitenant will change a DBA's life 391 SELECT name FROM v$parameter WHERE ispdb_modifiable='TRUE'; SELECT name, value FROM v$system_parameter WHERE con_id=n; SELECT name, value FROM v$system_parameter;
  • 392. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Standby Databases  Provision a new PDB  Cloning of a PDB – ADG!! – Not for Single Tenant or SE2  Plugin an existing PDB How Oracle Single/Multitenant will change a DBA's life 392 CDB_PROD PDB$ SEED CDB_STBY PDB$ SEED PDB1 PDB1 CDB_PROD PDB$ SEED CDB_STBY PDB$ SEED PDB1 PDB1 PDB2 PDB2 CDB_PROD PDB$ SEED CDB_STBY PDB$ SEED PDB1 PDB1 Manual copy required
  • 393. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | RAC Node 1 RAC and PDBs How Oracle Single/Multitenant will change a DBA's life 393 RAC Node 2 CDB PDB$ SEED PDB1 Instance CDB2Instance CDB1 PDB$SEED Instance ID 1 PDB$SEED Instance ID 2 PDB1 Instance ID 1 PDB1 Instance ID 2
  • 394. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | RAC Node 1 RAC and PDBs How Oracle Single/Multitenant will change a DBA's life 394 RAC Node 2 CDB PDB$ SEED PDB1 Instance CDB2Instance CDB1 PDB$SEED Instance ID 1 PDB$SEED Instance ID 2 PDB1 Instance ID 1 PDB1 Instance ID 2
  • 395. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Backup & Recovery  Backup and recovery with RMAN – Entire CDB with all PDBs – Just the CDB$ROOT only – PDBs: BACKUP DATABASE PLUS ARCHIVELOG; RESTORE DATABASE; RECOVER DATABASE; BACKUP DATABASE ROOT; RESTORE DATABASE ROOT; RECOVER DATABASE ROOT; BACKUP PLUGGABLE DATABASE sales, hr; RESTORE PLUGGABLE DATABASE 'pdb$seed', sales, hr; RECOVER PLUGGABLE DATABASE 'pdb$seed', sales, hr; How Oracle Single/Multitenant will change a DBA's life 395
  • 396. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Diagnosing Issues  The alert.log isn't always a great help ?Happened in which PDB(s)? How Oracle Single/Multitenant will change a DBA's life 396
  • 397. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | APEX – Oracle Application Express  Remove "common" APEX from the CDB$ROOT container – apxremov_con.sql  Install APEX locally in PDBs only - will ease your life a lot – apexins.sql or apxrtins.sql – Save upgrade downtime – Unplug/plug without APEX version conflicts – More flexibility  Different APEX versions  No "common" APEX upgrade necessary How Oracle Single/Multitenant will change a DBA's life 397 CDB$ROOT No APEX PDB$ SEED No APEXNo APEXNo APEX APEX_040200 Schema APEX_0 40200 APEX_0 40200 APEX_0 40200 APEX_0 40200 No APEX
  • 398. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Database Vault  Database Vault must be enabled in CDB root  Database Vault can be enabled/disabled separately in PDBs – DBMS_MACADM.ENABLE_DV – DBMS_MACADM.DISABLE_DV – http://docs.oracle.com/database/121/DVADM/dvdisabl.htm#DVADM71063  Each PDB can have its own local DV owner and DV account manager  Security policies are enforced locally in each PDB  Documentation: – http://docs.oracle.com/database/121/DVADM/dvintro.htm#DVADM71131 How Oracle Single/Multitenant will change a DBA's life 398
  • 399. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Separation  Security concept delivers isolation by default How Oracle Single/Multitenant will change a DBA's life 399 CDB$ ROOT PDB$SEED PDB1 APPL DBA1 SYSC##ADM
  • 400. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | AWR – Where are the AWR tables? How Oracle Single/Multitenant will change a DBA's life 400
  • 401. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | AWR – Automatic Workload Repository  AWR data is stored in CDB$ROOT only – But is is visible from within each PDB – awrrpt.sql works on CDB and PDB level – Unplug/plug of a PDB does not carry AWR data  Find a full list of all management features (ASH, ADDM, Stats etc) in PDB/CDB here: https://docs.oracle.com/database/121/ADMIN/cdb_admin.htm#BAJCBDJA How Oracle Single/Multitenant will change a DBA's life 401
  • 402. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | AWR Lite Snapshots  MOS Note:1993045.1 Reducing AWR resource consumption using LITE mode snapshots – Automatic snapshots  _AWR_SNAPSHOT_LEVEL = BASIC | LITE | TYPICAL | ALL | BESTFIT – On-demand snapshots  SQL> exec dbms_workload_repository.create_snapshot('LITE');  Introduced with Oracle Database 12.1.0.2 How Oracle Single/Multitenant will change a DBA's life 402
  • 403. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Drop your PDB upon unplug  If you miss this step: – Information will be kept in the CDB$ROOT's dictionary – Issues when you create/plugin another PDB with the same name How Oracle Single/Multitenant will change a DBA's life 403 CDB1 – Oracle 12.1.0.1 PDB$ SEED PDB1 PDB1 xml PDB1 alter pluggable database PDB1 close; alter pluggable database PDB1 unplug into '/stage/pdb1.xml'; drop pluggable database PDB1 keep datafiles;
  • 404. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Plugin Compatibility Check  Not always as helpful as intended – COMPATIBLE  NO ?!? How Oracle Single/Multitenant will change a DBA's life 404 CDB PDB$ SEED PDB1 PDB1 xml PDB1 SET SERVEROUTPUT ON DECLARE compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY( pdb_descr_file => '/data/pdb1.xml', pdb_name => PDB1') WHEN TRUE THEN 'YES' ELSE 'NO' END; BEGIN DBMS_OUTPUT.PUT_LINE(compatible); END; /
  • 405. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | PDB_PLUG_IN_VIOLATIONS  Issues before or after plugin – PDB_PLUG_IN_VIOLATIONS doesn't get purged – Some useless entries How Oracle Single/Multitenant will change a DBA's life 405
  • 406. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | PDB$SEED's objects/files excluded by default  exclude_seed_cdb_view=TRUE  No worries – RMAN does it correct!  exclude_seed_cdb_view=FALSE How Oracle Single/Multitenant will change a DBA's life 406
  • 407. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Not supported yet with Oracle Multitenant  Flashback Pluggable Database – Flashback Database works but will flashback CDB$ROOT including all PDBs  Oracle Streams  Heat Map  Automatic Data Optimization  BEQ connection to a PDB  DBVERIFY  Data Recovery Advisor (DRA)   Database Change Notification  Continuous Query Notification (CQN)  Client Side Cache  Flashback Transaction Backout How Oracle Single/Multitenant will change a DBA's life 407
  • 408. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 408 Plug into Oracle Multitenant Upgrade, Migrate & Consolidate to Oracle Database 12c 1 2 3 4 Overview Plug in Upgrade Working Reality5
  • 409. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Stand Alone Real World Customer Experience  @Oracle – Production Environment CDB with 2 PDBs CDB PDB$ SEED PDB1DB1 CDB with 16 PDBs and Physical Standby plus EM CDB PDB$ SEED PDB1 PDB3 PDB16...PDB2 PDB2 SWITCHOVER Upgrade, Migrate & Consolidate to Oracle Database 12c 409
  • 410. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Customer Experience  Consolidation planning factors – IO – CPU – Memory usage – Redo rate  http://www.oracle.com/technetwork/database/multitenant/ learn-more/oraclemultitenantt5-8-final-2185108.pdf Upgrade, Migrate & Consolidate to Oracle Database 12c 410
  • 411. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Customer Experience "It is very stable" "Issues may get to you now at once" "If seen as 15 different databases I don't think I would have configured them on this cluster. But as deployment of 15 PDBs within one container it has been made possible" "A bit more work regarding monitoring but a lot of improvements" " I am definitely impressed with the quality and stability side" " If we talk about whether a DBA's life is much easier I think its a mixed bag" Upgrade, Migrate & Consolidate to Oracle Database 12c 411
  • 412. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 412Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 8 Character Set Conversion
  • 413. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion  DMU – Data Migration Assistant for Unicode – Installed in every $ORACLE_HOME since Oracle 11.2.0.4 – Supports migrations in place to AL32UTF8 and UTF8 charactersets only – http://www.oracle.com/technetwork/database/database- technologies/globalization/dmu/overview/index.html – Documentation: Upgrade, Migrate & Consolidate to Oracle Database 12c 413
  • 414. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  Before you start: $ chmod +x dmu.sh Upgrade, Migrate & Consolidate to Oracle Database 12c 414 $ cd $ORACLE_HOME/dmu [UPGR] oracle@localhost:/u01/app/oracle/product/12.1.0.2/dmu $ ls -lrt total 132 -rw-r--r-- 1 oracle oinstall 53 Jul 19 2012 dmu.sh -rw-r--r-- 1 oracle oinstall 18432 Dec 23 2012 dmuW64.exe -rw-r--r-- 1 oracle oinstall 32768 Dec 23 2012 dmuW32.exe -rw-r--r-- 1 oracle oinstall 18432 Dec 23 2012 dmu64.exe -rw-r--r-- 1 oracle oinstall 32768 Dec 23 2012 dmu32.exe drwxr-xr-x 3 oracle oinstall 4096 Jul 21 2014 sleepycat drwxr-xr-x 7 oracle oinstall 4096 Jul 21 2014 ide drwxr-xr-x 9 oracle oinstall 4096 Jul 21 2014 dmu drwxr-xr-x 2 oracle oinstall 4096 Jul 21 2014 timingframework drwxr-xr-x 8 oracle oinstall 4096 Jul 21 2014 modules drwxr-xr-x 2 oracle oinstall 4096 Jul 21 2014 jlib
  • 415. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  Check for a newer version of DMU: Upgrade, Migrate & Consolidate to Oracle Database 12c 415
  • 416. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  Define connections:  Repository Configuration Wizard: Upgrade, Migrate & Consolidate to Oracle Database 12c 416
  • 417. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  Choose target character set:  Choose repository tablespace: Upgrade, Migrate & Consolidate to Oracle Database 12c 417
  • 418. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 418
  • 419. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 419
  • 420. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 420
  • 421. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 421
  • 422. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 422
  • 423. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 423
  • 424. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 424
  • 425. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU Upgrade, Migrate & Consolidate to Oracle Database 12c 425
  • 426. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  Scan Wizard will be called again:  Execute pre-conversion tasks: Upgrade, Migrate & Consolidate to Oracle Database 12c 426
  • 427. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Character Set Conversion - DMU  SQL generation:  Done! Upgrade, Migrate & Consolidate to Oracle Database 12c 427
  • 428. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 428Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7 Into the Cloud9
  • 429. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Requirements  Oracle Cloud (DBaaS) Account  Local database (on premise) Upgrade, Migrate & Consolidate to Oracle Database 12c 429
  • 430. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Environment in the DBaaS Cloud  Choose your service: Upgrade, Migrate & Consolidate to Oracle Database 12c 430 PDB VM only – plus tarball
  • 431. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Environment in the DBaaS Cloud  Connect to your database Upgrade, Migrate & Consolidate to Oracle Database 12c 431
  • 432. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Migration Options Into the Oracle Cloud Upgrade, Migrate & Consolidate to Oracle Database 12c 432
  • 433. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Migration to the Oracle Database Cloud Service  You'll get: – 1 container database – 1 pluggable database  You'll have to do: – Just start ... Upgrade, Migrate & Consolidate to Oracle Database 12c 433 CDB PDB$ SEED PDB1 PDB2 PDBn
  • 434. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Migration to the Oracle Database Cloud Service – VM Image  You'll get: – A virtual machine – A tar ball containing the Oracle database software  You'll have to: – Unpack the tar ball – Install Oracle Database 12.1.0.2 – Patch Oracle Database 12.1.0.2 – Create your database(s) Upgrade, Migrate & Consolidate to Oracle Database 12c 434 CDB PDB$ SEED PDB1 PDB2 PDBn
  • 435. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Pump – Conventional Export/Import  expdp  Transfer dump file into the cloud  impdp  NETWORK_LINK an option – Tunnel sqlnet over ssh  Works: – Cross versions – Cross OS platforms – Cross character sets  Migration Upgrade, Migrate & Consolidate to Oracle Database 12c 435 SFTP / ssh expdp impdp Dump File Dump File
  • 436. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Transportable Tablespaces  expdp meta information  Transfer into the cloud: – Tablespace files – Meta dump files  impdp meta information  Works: – Cross versions – Cross OS platforms (convert!)  Potential character set migration required upfront  Migration Upgrade, Migrate & Consolidate to Oracle Database 12c 436 SFTP / ssh expdp impdp Meta TS1 TS2 TS1 TS2 Meta
  • 437. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Full Transportable Export/Import  expdp meta information  Transfer into the cloud: – Tablespace files – Dump file  NETWORK_LINK an option  impdp one-command migration  Works: – Cross versions with ≥11.2.0.3 – Cross OS platforms (convert!)  Character set must match  Migration Upgrade, Migrate & Consolidate to Oracle Database 12c 437 SFTP / ssh expdp impdp Full Export Dump TS1 TS2 TS1 TS2Full Export Dump
  • 438. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Guard as Transport Vehicle  Transfer into the cloud: – RMAN backup  DUPLICATE FOR STANDBY FROM ACTIVE DATABASE is an option  Works: – Little Endian OS platforms – Same version – Stand-alone/stand-alone or PDB/PDB  DR to cloud using (Active) Data Guard  Migration Upgrade, Migrate & Consolidate to Oracle Database 12c 438 SFTP / ssh Backup Backup Redo
  • 439. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Managing Mixed Environments  Enterprise Manager Hybrid Cloud Control – https://docs.oracle.com/cd/E24628_01/doc.121/e24473/hybrid-cloud.htm#EMADM15141 Upgrade, Migrate & Consolidate to Oracle Database 12c 439
  • 440. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 440Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 441. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback Strategy – Strategy  Never start an upgrade or migration without evaluating and testing your options for going back ...  Complete RMAN Online Backup is always a must  Clarify: – Fallback requirements in minutes/hours/days – How to deal with issues happening during the upgrade – How to deal with issues hours/days after the upgrade – Will you get additional downtime to change COMPATIBLE? 441Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 442. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter COMPATIBLE  Minimum COMPATIBLE in Oracle Database 12c: 11.0.0 – 11.0.0 and 11.1.0 are equivalent – Recommendation:  Change it 7-10 days after upgrade – but restart required – SQL> – COMPATIBLE can't be turned back alter system set compatible='12.1.0' scope=spfile; COMPATIBLE must be increased to ≥11.0.0 Downgrade possible COMPATIBLE can remain on 11.x.y 442Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 443. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback Strategy - Issues during upgrade ALWAYS take a complete ONLINE backup with RMAN NoYes Change COMPATIBLE parameter? Partial OFFLINE Backup ≥ 11.0 Guaranteed Restore Point Full restore and recovery Flashback to GRPPartial Restore Yes Full ONLINE Backup 443Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 444. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Online Backup  Restore a backup – Complete online backup (RMAN) – Please verify:  Where is your backup located? Tapes, HD, off site...  Does the restore work?  How long will the restore take?  How long will the recovery take? – Recommendation:  Have a valid online backup in any case – and test it!!! 444Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 445. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Offline Backup  Restore a partial offline backup – Put all data tablespaces in read-only mode  That's downtime! – Shutdown the database IMMEDIATE – Copy SYSTEM, UNDO, TOOLS, SYSAUX, XDB, DRSYS and ODM data files plus control files and redo logs – In case of failure:  Shutdown and copy all partial backup files back  Startup in the old environment and recreate TEMP – Advantages:  Fast and simple, even COMPATIBLE can be changed 445Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 446. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Restore Point  Flashback to a guaranteed restore point – COMPATIBLE cannot be changed Pre Upgrade Environment Post Upgrade Environment CREATE RESTORE POINT grpt GUARANTEE FLASHBACK DATABASE; SHUTDOWN IMMEDIATE STARTUP MOUNT; FLASHBACK DATABASE TO RESTORE POINT grpt; SHUTDOWN IMMEDIATE STARTUP MOUNT; ALTER DATABASE OPEN RESETLOGS; DROP RESTORE POINT grpt; UPGRADE 446Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 447. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback Strategy – Issues after upgrade AGAIN take a complete ONLINE backup with RMAN after the upgrade NoYes Change COMPATIBLE parameter? ≥ 11.1 Oracle GoldenGate Downgrade Data Pump Re-Import Yes 447Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 448. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Data Pump  Downgrade with expdp/impdp to 10.x – MOS Note:553337.1 – Prepare an empty database for the import “just in case” – Then: – Run expdp from the 12.1 database home with the VERSION parameter equal to the target database COMPATIBLE setting – Import using impdp from the target database home – NETWORK_LINK can be used for downgrades as well – 448Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 449. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: GoldenGate  Downgrade with Oracle GoldenGate – Version/platform independent Source 1 2 “Downgrade” Upgraded destination database 449Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 450. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Downgrade  Downgrade with catdwgrd.sql – Upgrade Guide – Downgrading a database to an earlier release: https://docs.oracle.com/database/121/UPGRD/downgrade.htm#UPGRD007 – MOS Note:1516622.1: How to Downgrade Oracle Database 12c Release 1 (12.1) to Previous Versions  Special actions required for DV, OLS and other things – please see the note and the documentation – Downgrade possible to:  Oracle 11.1.0.7  Oracle 11.2.0.x – Do not change COMPATIBLE 450Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 451. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fallback: Downgrade  Basic steps to downgrade with catdwgrd.sql – In Oracle Database 12c environment: – In Oracle Database 11g environment: SQL> SPOOL /tmp/downgrade.log SQL> STARTUP DOWNGRADE SQL> @catdwgrd.sql SQL> SHUTDOWN IMMEDIATE SQL> SPOOL OFF SQL> STARTUP UPGRADE SQL> SPOOL /tmp/reload.log SQL> @catrelod.sql SQL> SPOOL OFF 451Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 452. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 452Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 453. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Database 12c New Features Guide  http://docs.oracle.com/cd/E16655_01/server.121/e17906/toc.htm Upgrade, Migrate & Consolidate to Oracle Database 12c 453
  • 454. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Database 12c Interactive Quick Reference  http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/poster/OUTPUT_poster/poster.html# Upgrade, Migrate & Consolidate to Oracle Database 12c 454
  • 455. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 455Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 456. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Simplifying the life cycle of data  An in-memory heat map tracks block and segment access – Data is periodically written to disk – Information is accessible by views or stored procedures  Users can attach policies to tables to compress or tier data based on access to data – Tables or Partitions can be moved between compression levels whilst data is still being accessed  New feature of the Advanced Compression Option Policy 1 456Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 457. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Add compression and tiering policies to tables Oldest Data Most Recent Data Policy 1 Policy 2 Compress Partitions with row compression if they haven’t been modified in 30 days Compress Partitions with Hybrid columnar compression if they haven’t been modified in 180 days 457Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 458. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization A heat map tracks the activity of segments and blocks Oldest Data Most Recent Data Policy 1 Policy 2 458Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 459. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Policies are automatically applied to tables Oldest Data Most Recent Data Policy 1 Policy 2 459Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 460. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Policies are automatically applied to tables Oldest Data Most Recent Data Policy 1 Policy 2 460Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 461. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Policies are automatically applied to tables Oldest Data Most Recent Data Policy 1 Policy 2 461Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 462. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Reduce storage footprint, read compressed data faster Oldest Data Most Recent Data Policy 1 Policy 2 462Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 463. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Optimization Automatically tier data to lower cost storage Oldest Data Most Recent Data Policy 1 Policy 2 Policy 3 If the tablespace is nearly full compress the oldest partition with archive compression and move it to Tier 2 Storage 463Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 464. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 464Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 465. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Zero Data Loss Challenge Trade-off between Zero Data Loss and Performance The longer the distance, the larger the performance impact Primary Standby Commit Commit Ack Network Send Network Ack 465Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 466. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Active Data Guard Far Sync Standby between continents with zero data loss Primary Standby Far Sync Instance (Active) Far Sync Instance (Idle) New York Bridgeport Reading London sync async 466Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 467. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle ASM 12c – Overview  Oracle ASM 12c Standard Deployment ASM Cluster Pool of Storage Disk Group BDisk Group AShared Disk Groups Wide File Striping One to One Mapping of ASM Instances to Servers ASM Instance Database Instance ASM Disk RAC Cluster Node4Node3Node2Node1 Node5 ASM ASM ASM ASM ASM ASM Instance Database Instance DBA DBA DBCDBB DBBDBB Upgrade, Migrate & Consolidate to Oracle Database 12c 467
  • 468. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Introducing Oracle Flex ASM  Removal of One to One Mapping and HA ASM Cluster Pool of Storage Disk Group BDisk Group AShared Disk Groups Wide File Striping Databases share ASM instances ASM Instance Database Instance ASM Disk RAC Cluster Node5Node4Node3Node2Node1 Node5 runs as ASM Client to Node4 Node1 runs as ASM Client to Node2 Node1 runs as ASM Client to Node4 Node2 runs as ASM Client to Node3 ASM ASM ASM ASM Instance DBA DBA DBCDBB DBBDBB Upgrade, Migrate & Consolidate to Oracle Database 12c 468
  • 469. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 Fine-grained Table Recovery From Backup  Simple RECOVER TABLE command to recover one or more tables (most recent or older version) from an RMAN backup  Eliminates time and complexity associated with manual restore, recover & export RMAN Backups Upgrade, Migrate & Consolidate to Oracle Database 12c 469
  • 470. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 470Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 471. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Soc. Sec. # 115-69-3428 DOB 11/06/71 PIN 5623 Policy enforced redaction of sensitive data Redacting Sensitive Data Mask Application Data Dynamically Call Center Operator Payroll Processing Call Centers Decision Support Systems Systems with PII, PHI, PCI data 471Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 472. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Real-time sensitive data redaction based on database session context  Library of redaction policies and point-and-click policy definition  Consistent enforcement, policies applied to data  Transparent  Backported to Oracle 11.2.0.4 Oracle Advanced Security Redaction of Sensitive Data Displayed Preventive Control for Oracle Database 12c Credit Card Numbers 4451-2172-9841-4368 5106-8395-2095-5938 7830-0032-0294-1827 Redaction Policy xxxx-xxxx-xxxx-4368 4451-2172-9841-4368 Billing Department Call Center Application Upgrade, Migrate & Consolidate to Oracle Database 12c 472
  • 473. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Turn on privilege capture mode – DBMS_PRIVILEGE_CAPTURE  Report on actual privileges and roles used in the database  Helps revoke unnecessary privileges  Enforce least privilege and reduce risks – Part of Oracle Database Vault license Oracle Database 12c EE Discover Use of Privileges and Roles Administrative Control for Oracle Database 12c Privilege Analysis Create… Drop… Modify… DBA role APPADMIN role Upgrade, Migrate & Consolidate to Oracle Database 12c 473
  • 474. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Data Masking Securely Provisioning Test Systems  Mask At-Source  Minimize sensitive data exposure 010010110010101001001001001001001001001001001000100101 010010010010011100100100100100100100001001001011100100 101010010010101010011010100101010010 Subsetted & Masked Data Pump File 12.1 Prod Test At-Source Masking  Production data subsetted first  Sensitive data masked separately 01001011001010100100100100100100100100100100100010010 10100100100100111001001001001001001000010010010111001 00101010010010101010011010100101010010 Prod Data Subset Clone &Mask 11.2 Test 474Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 475. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | No longer part of ASO anymore!  Network encryption – Native and SLS/TLS  Strong authentication services – Kerberos, PKI and RADIUS  Available in all licensed editions of all supported releases Upgrade, Migrate & Consolidate to Oracle Database 12c 475
  • 476. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 476Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 477. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Adaptive Execution Plans HJ Table scan T2 Table scan T1 NL Index Scan T2 Threshold exceeded, plan switches Table scan T1 HJ Table scan T2  Plan decision deferred until runtime  Final decision is based on statistics collected during execution  If statistics prove to be out of range, sub-plans can be swapped  Bad effects of skew eliminated  _optimizer_adaptive_plans Upgrade, Migrate & Consolidate to Oracle Database 12c 477
  • 478. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Statistic Enhancements with Oracle Database 12c  New types of histograms – Top Frequency and Hybrid  Online statistics gathering – Statistics gathered as part of CTAS or IAS commands  Session level statistics for GTTs – Private statistics for GTT on per session basis - GLOBAL_TEMP_TABLE_STATS is SESSION per default  Enhanced incremental statistics  Automatic detection of column groups  Statistic gathering reporting Upgrade, Migrate & Consolidate to Oracle Database 12c 478
  • 479. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Simplified Analysis of Big Data Pattern Matching Select * from Ticker MATCH_RECOGNIZE ( … PATTERN(X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price)), Y AS (price > PREV(price)), W AS (price < PREV(price)), Z AS (price > PREV(price) … )  Scalable discovery of business event sequences – Clickstream logs: sessionization, search behaviour – Financial transactions: fraud detection, double bottom (“W”) stock analysis – Telco: dropped calls – Medical sensors: automated medical observations and detections AscendingOrder “W” event defined as regular expression Upgrade, Migrate & Consolidate to Oracle Database 12c 479
  • 480. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | next = lineNext.getQuantity(); } if (!q.isEmpty() && (prev.isEmpty() || (eq(q, prev) && gt(q, next)))) { state = "S"; return state; } if (gt(q, prev) && gt(q, next)) { state = "T"; return state; } if (lt(q, prev) && lt(q, next)) { state = "B"; return state; } if (!q.isEmpty() && (next.isEmpty() || (gt(q, prev) && eq(q, next)))) { state = "E"; return state; } if (q.isEmpty() || eq(q, prev)) { state = "F"; return state; } return state; } private boolean eq(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return a.equals(b); } private boolean gt(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return Double.parseDouble(a) > Double.parseDouble(b); } private boolean lt(String a, String b) { if (a.isEmpty() || b.isEmpty()) { return false; } return Double.parseDouble(a) < Double.parseDouble(b); } public String getState() { return this.state; } } BagFactory bagFactory = BagFactory.getInstance(); @Override public Tuple exec(Tuple input) throws IOException { long c = 0; String line = ""; String pbkey = ""; V0Line nextLine; V0Line thisLine; V0Line processLine; V0Line evalLine = null; V0Line prevLine; boolean noMoreValues = false; String matchList = ""; ArrayList<V0Line> lineFifo = new ArrayList<V0Line>(); boolean finished = false; DataBag output = bagFactory.newDefaultBag(); if (input == null) { return null; } if (input.size() == 0) { return null; } Object o = input.get(0); if (o == null) { return null; } //Object o = input.get(0); if (!(o instanceof DataBag)) { int errCode = 2114; Pattern Matching Finding Double Bottom (W) SELECT first_x, last_z FROM ticker MATCH_RECOGNIZE ( PARTITION BY name ORDER BY time MEASURES FIRST(x.time) AS first_x, LAST(z.time) AS last_z ONE ROW PER MATCH PATTERN (X+ Y+ W+ Z+) DEFINE X AS (price < PREV(price)), Y AS (price > PREV(price)), W AS (price < PREV(price)), Z AS (price > PREV(price) AND z.time - FIRST(x.time) <= 7 )) 250+ Lines of Java and PIG 12 Lines of SQL 20x less code, 5x faster Upgrade, Migrate & Consolidate to Oracle Database 12c 480
  • 481. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Optimizer with Oracle Database 12c  What to expect from the Optimizer in Oracle Database 12c – http://www.oracle.com/technetwork/database/bi-datawarehousing/twp- optimizer-with-oracledb-12c-1963236.pdf Upgrade, Migrate & Consolidate to Oracle Database 12c 481
  • 482. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Various 12c optimizer parameters  Please test carefully: • _optimizer_adaptive_plans • _optimizer_use_feedback • _optimizer_adaptive_cursor_sharing • Please disable: • _optimizer_aggr_groupby_elim • _optimizer_unnest_scalar_sq • _rowsets_enabled • _optimizer_reduce_groupby_key Upgrade, Migrate & Consolidate to Oracle Database 12c 482
  • 483. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 483Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 484. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Online Move of Datafiles  Rename or relocate datafiles online [EE Feature] – Move from one type of storage to another, or into ASM – Examples:  Rename:  Relocate:  Copy: ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO '/data/user001.dbf'; ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO '/test/user1.dbf'; ALTER DATABASE MOVE DATAFILE '/data/user1.dbf' TO '/test/user1.dbf' KEEP; Upgrade, Migrate & Consolidate to Oracle Database 12c 484
  • 485. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | IDENTITY  Example: CREATE TABLE t1 (id NUMBER GENERATED AS IDENTITY, first_name varchar2(30)); INSERT INTO t1(first_name) values ('Hugo'); ID FIRST_NAME ----- ------------ 1 Hugo CREATE TABLE t2 (id NUMBER GENERATED BY DEFAULT AS IDENTITY (START WITH 100 INCREMENT BY 10), first_name varchar2(30)); Create a table where the id column is always populated by Oracle Create a table where the id column is populated by Oracle when not provided Upgrade, Migrate & Consolidate to Oracle Database 12c 485
  • 486. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Row Limit  Example: SELECT employee_id, last_name FROM employees ORDER BY employee_id FETCH FIRST 5 ROWS ONLY; SELECT employee_id, last_name, salary FROM employees ORDER BY salary FETCH FIRST 5 PERCENT ROWS WITH TIES; Select only the first 5 rows Select the first 5% of rows and those whose salary “ties” with the lowest of the 5% Upgrade, Migrate & Consolidate to Oracle Database 12c 486
  • 487. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 32K VARCHAR2 / NVARCHAR2  Example: ALTER SYSTEM set MAX_STRING_SIZE=EXTENDED scope=SPFILE; CREATE TABLE Applicants (id NUMBER GENERATED AS IDENTITY, first_name varchar2(30), last_name varchar2(30), application date, CV varchar2(32767) ); Enable 32k support in the Oracle Database 12c Create table with 32k varchar2 SHUTDOWN IMMEDIATE STARTUP UPGRADE @?/rdbms/admin/utl32k.sql Upgrade, Migrate & Consolidate to Oracle Database 12c 487
  • 488. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enterprise Manager Express Upgrade, Migrate & Consolidate to Oracle Database 12c 488
  • 489. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enterprise Manager Express  Manual configuration of the HTTP port for EM Express – In init.ora/spfile (default setting):  dispatchers=(PROTOCOL=TCP)(SERVICE=sample XDB) – Check on which port EM Express is configured:  SQL> select DBMS_XDB_CONFIG.getHTTPport() from dual; – SQL> select DBMS_XDB_CONFIG.getHTTPSport() from dual; – Set a new port:  SQL> exec DBMS_XDB_CONFIG.setHTTPport(5500); – SQL> exec DBMS_XDB_CONFIG.setHTTPSport(8080); – Now access the EM Express homepage in the browser:  http://database-hostname:port/em – http://localhost:5500/em – The configuration will have to be done for the CDB and every single PDB on different ports Upgrade, Migrate & Consolidate to Oracle Database 12c 489
  • 490. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enterprise Manager Cloud Control 12c  Discovered Oracle Database 12c targets: Upgrade, Migrate & Consolidate to Oracle Database 12c 490
  • 491. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Enterprise Manager Cloud Control 12c  Plug-in "Enterprise Manager For Oracle Database (DB) 12.1.0.4" already released via EM Self-Update – Supports Oracle Database 12.1.0.2 – Discovers CDBs and PDBs Upgrade, Migrate & Consolidate to Oracle Database 12c 491
  • 492. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Customer Reference Neustar company profile  Neustar is the first real-time provider of cloud-based information services and data analytics, enabling marketing and IT security professionals to promote and protect their businesses. With a commitment to privacy and neutrality, Neustar operates complex data registries and uses its expertise to deliver actionable, data-driven insights that help clients make high-value business decisions in real time, one customer interaction at a time.  Webcast about achieving ~300x performance gains with Oracle Spatial in Oracle Database 12c is available here.  More information is available at www.neustar.biz. Connect with Neustar on Facebook, Twitter, and LinkedIn. Upgrade, Migrate & Consolidate to Oracle Database 12c 492
  • 493. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | ElementOne on 12c Miscellaneous Features  Reduction in redo/undo generation using global temporary tables resulting in 1.7x performance boost  2x performance gains with inline PL/SQL functions  Up to 10x faster processing time with constructing large CLOBs / BLOBs  Faster response times with cross session result set cache Upgrade, Migrate & Consolidate to Oracle Database 12c 493
  • 494. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | "Our experience with upgrade has been very positive, upgrading to 12c, and we have been very impressed with the robustness of 12c." Nick Salem Distinguished Engineer Neustar, Inc. Upgrade, Migrate & Consolidate to Oracle Database 12c 494
  • 495. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automatic Data Opti- mization Availability SecurityOptimizer Other Enhance- ments In- Memory 495Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 496. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Until Now Must Choose One Format and Suffer Tradeoffs Optimizing Transaction and Query Performance Row Format Databases versus Column Format Databases Row  Transactions run faster on row format – Insert or query a sales order – Fast processing few rows, many columns Column  Analytics run faster on column format – Example : Report on sales totals by region – Fast accessing few columns, many rows SALES SALES 496Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 497. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Dual Format In-Memory Database  BOTH row and column in- memory formats for same table  Simultaneously active and transactionally consistent  Analytics & reporting use new in-memory Column format  OLTP uses proven row format 497 Memory Memory SALES SALES Row Format Column Format Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 498. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle In-Memory Columnar Technology  Pure in-memory column format  Not persistent, and no logging  Quick to change data: fast OLTP  2x to 20x compression  Enabled at table/partition level  Available on all hardware platforms 498 SALES Pure In-Memory Columnar Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 499. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Orders of Magnitude Faster Analytic Data Scans 499 VectorRegister Load multiple region values Vector Compare all values an 1 cycle CPU Memory REGION CA CA CA CA Example: Find all sales in region of CA > 100x Faster  Each CPU core scans local in- memory columns  Scans use super fast SIMD vector instructions  Originally designed for graphics & science  Billions of rows/sec scan rate per CPU core  Row format is millions/sec Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 500. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Joining and Combining Data Also Dramatically Faster  Converts joins of data in multiple tables into fast column scans  Joins tables 10x faster 500 Example: Find total sales in outlet stores SalesStores StoreID Amount Type=Outlet StoreID in 15, 38, 64 StoreID Type Sum Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 501. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Generates Reports Instantly  Dynamically creates in-memory report outline  Then report outline filled-in during fast fact scan  Reports run much faster without predefined cubes 501 Example: Report sales of footwear in outlet stores Sales Stores Products In-Memory Report Outline Footwear Outlets $ $$ $ $$$ Footwear Sales Outlets Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 502. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Complex OLTP is Slowed by Analytic Indexes Table 1 – 3 OLTP Indexes 10 – 20 Analytic Indexes 502 Table 1 – 3 OLTP Indexes In-Memory Column Store Column Store Replaces Analytic Indexes Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 503. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle In-Memory: Simple to Implement 1. Configure Memory Capacity inmemory_size = XXX GB 2. Configure tables or partitions to be in memory alter table | partition … inmemory; 3. Hide - and later - drop analytic indexes to speed up OLTP 503Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 504. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle In-Memory: Simple to Implement • INMEMORY_CLAUSE_DEFAULT • INMEMORY_FORCE • INMEMORY_MAX_POPULATE_SERVERS • INMEMORY_QUERY • INMEMORY_SIZE • INMEMORY_TRICKLE_REPOPULATE_SERVERS_PERCENT • OPTIMIZER_INMEMORY_AWARE 504Upgrade, Migrate & Consolidate to Oracle Database 12c • Documentation: http://docs.oracle.com/database/121/ADMIN/memory.htm#ADMIN14257 • White Paper: http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory- 2245633.html
  • 505. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle In-Memory Requires Zero Application Changes Full Functionality - No restrictions on SQL Fully Multitenant - No migration of data Fully Compatible - All existing applications run unchanged Uniquely Achieves All In-Memory Benefits With No Application Changes 505Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 506. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | “In terms of how easy the in-memory option was to use, it was actually almost boring. It just worked - just turn it on, select the tables, nothing else to do.” Mark Rittman Chief Technical Officer Rittman Mead Upgrade, Migrate & Consolidate to Oracle Database 12c 506
  • 507. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Which tables/partitions? Oracle In-Memory Advisor  Download the Advisor from MOS Note: 1965343.1  Install it in any 11.2.0.3 or newer database  Will create SQL scripts to read tables/partitions into In-Mem  Part of the Oracle Tuning Pack license  Further Information on OTN: http://www.oracle.com/technetwork/datab ase/manageability/inmemory-advisor- 2412222.html 507 In-Memory Columnar Store Upgrade, Migrate & Consolidate to Oracle Database 12c In-Memory Advisor
  • 508. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 508Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 509. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance Checklist  Adjust maintenance windows  Configure statistics retention  Configure incremental statistics  Adjust memory and optimizer parameters  Configure AWR, ASH and ADDM  Preserve and transport execution plans  General test guidelines  Real Application Testing  System Statistics  Automatic Tuning Advisor Prepare Stability Test Optimize  Enable Performance FeaturesFeatures 509Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 510. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Adjust default maintenance windows – Check:  Default: – Weekday windows: 10pm to 2am (4 hours) – Weekend windows: 6am to 2am (20 hours)  Resource Manager is active  Adjust windows SQL> exec DBMS_SCHEDULER.SET_ATTRIBUTE( 'MONDAY_WINDOW','REPEAT_INTERVAL', 'freq=daily;byday=MON;byhour=05;byminute=0; bysecond=0'); SQL> exec DBMS_SCHEDULER.SET_ATTRIBUTE( 'MONDAY_WINDOW','DURATION',numtodsinterval(2,'hour')); SQL> select CLIENT_NAME, STATUS from DBA_AUTOTASK_CLIENT; 510Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 511. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Configure statistics history retention period – Check space usage: – Check retention:  Default: 31 days – Adjust setting  Example: 10 days SQL> select SPACE_USAGE_KBYTES/1024 MB from V$SYSAUX_OCCUPANTS where OCCUPANT_NAME='SM/OPTSTAT'; SQL> select DBMS_STATS.GET_STATS_HISTORY_RETENTION from DUAL; SQL> exec DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(10); 511Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 512. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Configure incremental statistics collection – Set for selected partitioned tables only: – Global setting:  Not recommended – Result:  Faster statistics collection for partitioned tables  Statistics will be generated for touched partitions only – Stats for that table must be gathered with GRANULARITY parameter set to AUTO – ESTIMATE_PERCENT must be set to AUTO_SAMPLE_SIZE SQL> exec DBMS_STATS.SET_TABLE_PREFS('SH','SALES' ,'INCREMENTAL','TRUE'); SQL> exec DBMS_STATS.SET_GLOBAL_PREFS('INCREMENTAL','TRUE'); 512Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 513. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Sysaux Tablespace Things to do right after upgrade  Incremental stats Sales Table May 22nd 2008 May 23rd 2008 May 18th 2008 May 19th 2008 May 20th 2008 May 21st 2008 Partition level stats are gathered & synopsis created  Global stats generated by aggregating partition level statistics and synopsis May 24th 2008 A new partition is added to the table & data is loaded Gather partition statistics for new partition  Retrieve synopsis for each of the other partitions from SYSAUX Global stats generated by aggregating the original partition synopsis with the new one 513Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 514. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  New in Oracle Database 12c – Incremental stats work with partition exchange – Define that "changed" partitions won't be eligible for new stats generation until …: – … this stale percentage is reached:  Default would be 10% - but only when enabled 514Upgrade, Migrate & Consolidate to Oracle Database 12c SQL> exec DBMS_STATS.SET_DATABASE_PREFS('INCREMENTAL_STALENESS','USE_STALE_PERCENT'); SQL> exec DBMS_STATS.SET_DATABASE_PREFS('STALE_PERCENT','12');
  • 515. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  DBMS_STATS.REPORT_STATS_OPERATIONS 515Upgrade, Migrate & Consolidate to Oracle Database 12c variable mystatrep2 clob; set long 1000000 begin :mystatrep2 := DBMS_STATS.REPORT_STATS_OPERATIONS(since=>SYSTIMESTAMP- 1,until=>SYSTIMESTAMP, detail_level=>'TYPICAL',format=>'HTML'); end; / spool /tmp/stats.html print mystatrep2 spool off
  • 516. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  DBMS_STATS.REPORT_GATHER_SCHEMA_STATS 516Upgrade, Migrate & Consolidate to Oracle Database 12c SET LINES 300 PAGES 0 SET LONG 1000000 COLUMN REPORT FORMAT A200 VARIABLE my_report CLOB; BEGIN :my_report := DBMS_STATS.REPORT_GATHER_SCHEMA_STATS(ownname => 'OE', detail_level => 'TYPICAL', format => 'HTML'); END; / spool /tmp/stats.html print mystatrep2 spool off
  • 517. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Configure Automatic Shared Memory Management – SGA_TARGET  Set minimum values: – If SGA resize by MMAN happens too frequently: "_MEMORY_BROKER_STAT_INTERVAL"=900 Default is 30 (seconds) – MEMORY_TARGET  Set only for ASM and for databases with constant load DB_CACHE_SIZE SHARED_POOL_SIZE 517Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 518. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Configure Automatic Shared Memory Management – PGA_AGGREGATE_TARGET  Check:  Guidelines: – PGA_AGGREGATE_LIMIT  Values: integer [ K | M | G ]  Default: >2GB and 200% of PGA_AGGREGATE_TARGET and 3MB x PROCESSES – it will not exceed 120% of physical memory – SGA size  Setting it to 0 will mean "no limit" OLTP: SGA=80% - PGA=20% of available memory DSS: SGA=30% - PGA=70% of available memory SQL> SELECT FROM V$PGASTAT; 518Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 519. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c 519 _RUN_EVERYTHING_FAST=TRUE Values: { TRUE | MAYBE | IM_IN_A_BAD_MOOD | DON’T_CARE } Explanation: Oracle runs always fast, doesn't it? Recommendation: Tune your application, not only your database Parameter Information Oracle 11.2/12c Don't try this at home. This picture has been taken on a closed circuit by an experienced German driver driving a decent German car 
  • 520. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations Oracle 12.1.0.2 Upgrade, Migrate & Consolidate to Oracle Database 12c 520 _OPTIMIZER_AGGR_GROUPBY_ELIM Values: { TRUE | FALSE } Explanation: Optimizer can eliminate some GROUP BY operations if possible Example: SQL> explain plan for 2 select /*+ opt_param('_optimizer_aggr_groupby_elim', 'false')*/ 3 dummy, sum(cnt) 4 from (select dummy, 5 count(*) cnt 6 from dualcopy 7 group by dummy) 8 group by dummy 9 ; Explained ----------------------------------------- | Id | Operation | Name | ----------------------------------------- | 0 | SELECT STATEMENT | | | 1 | HASH GROUP BY | | | 2 | VIEW | | | 3 | HASH GROUP BY | | | 4 | TABLE ACCESS FULL| DUALCOPY | ----------------------------------------- SQL> explain plan for 2 select /*+ opt_param('_optimizer_aggr_groupby_elim', 'true')*/ 3 dummy, sum(cnt) 4 from (select dummy, 5 count(*) cnt 6 from dualcopy 7 group by dummy) 8 group by dummy 9 ; Explained --------------------------------------- | Id | Operation | Name | --------------------------------------- | 0 | SELECT STATEMENT | | | 1 | HASH GROUP BY | | | 2 | TABLE ACCESS FULL| DUALCOPY | --------------------------------------- Recommendation: FALSE - Wrong Results with GROUP BY Clause in Nested Query (Doc ID 19567916.8)
  • 521. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations _OPTIMIZER_COST_BASED_TRANSFORMATION Values: { ON | OFF } Explanation: See MOS Note: 1082127.1 for more details on CBQT Annotation: Default is ON since Oracle Database 10.2 CBQT can add a high overhead at parse time but can yield considerable benefits by way of a better plan for the statement Recommendation: Set it to OFF until 11.2.0.3 due to limited gain and some open issues. See MOS Note: 567354.1 521Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 522. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations Oracle 12.1.0.2 Upgrade, Migrate & Consolidate to Oracle Database 12c 522 INMEMORY_FORCE Values: { DEFAULT | OFF } Explanation: In-Memory Optimization Recommendation: OFF – Unless you have an Oracle In-Memory license
  • 523. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Recommendations SESSION_CACHED_CURSORS Default: 50 Explanation: Specifies the number of session cursors to cache. More information in MOS Note: 30804.1 Annotation: Cursor caching mechanism was changed in Oracle 10.2.0.4 Recommendation: Set it to 200 and adjust the value later. Use MOS SCRIPT: 208857.1 to adjust parameters SESSION_CACHED_CURSORS and OPEN_CURSORS usage based. Too high values may lead to fragmentation in shared pool 523Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 524. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c _MEMORY_IMM_MODE_WITHOUT_AUTOSGA Values: { TRUE | FALSE } Explanation: Switching this parameter to FALSE will prevent the SGA from doing resize operations even though neither SGA_TARGET nor MEMORY_TARGET are set. Annotation: A generic enhancement in 11.2.0.1 was made to allow IMMEDIATE mode requests even when SGA_TARGET (or MEMORY_TARGET) is not set. This enhancement has been introduced to prevent ORA-4031 errors due to shared pool pressure Recommendation: Just be aware of this change To turn feature off: alter system set "_memory_imm_mode_without_autosga"=FALSE; Further information: MOS Note:1269139.1 524Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 525. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c OPTIMIZER_MODE Values: { ALL_ROWS | FIRST_ROWS | FIRST_ROWS_[1|10|100|1000]} Explanation: Establishes the default behavior for choosing an optimization approach for the instance Annotation: Obsolete settings (will be ignored): optimizer_mode=choose optimizer_mode=rule Only the /*+RULE */ hint will still work Recommendation: 525Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 526. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2.0.4/12c OPTIMIZER_DYNAMIC_SAMPLING Values: { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } Explanation: If statistics are not available it controls whether dynamic stats will be gathered, and the sample size Annotation:  0: Off  2: Check ≤64 blocks - generate stats during parse  11: NEW SETTING  Use dynamic statistics automatically when the Optimizer deems it  Verifies cardinality and implements a time limit for the estimate  Results persist as Shareable Statistics  Different behavior between 11.2.0.4 and 12.1.0.x Recommendation: See Oracle Database SQL Tuning Guide for details 526Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 527. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c Page248–SQLTuningGuide–OracleDatabase12c OPTIMIZER_DYNAMIC_SAMPLING 527Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 528. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c OPTIMIZER_USE_PENDING_STATISTICS Values: { FALSE | TRUE } Explanation: Mitigate the risk of newly created object statistics Object statistics persist through an upgrade Recommendation: Switch on Pending Statistics: SQL> exec DBMS_STATS.SET_GLOBAL_PREFS('PENDING','TRUE'); Gather new Oracle 12c statistics as "pending": SQL> DBMS_STATS.GATHER_SCHEMA_STATS('SH'); Verify critical statements using pending 12c statistics: SQL> alter session set optimizer_use_pending_statistics=TRUE; Once everything is good publish them: SQL> exec DBMS_STATS.PUBLISH_PENDING_STATS(); 528Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 529. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c STATISTICS_LEVEL Values: { TYPICAL | ALL | BASIC } Explanation: Specifies the level of collection for database and operating system statistics. The Oracle Database collects these statistics for a variety of purposes, including making self-management decisions Annotation: TYPICAL enables:  Automatic SGA Tuning (SGA_TARGET)  Automatic Statistics Collection  Active Session History (ASH)  DML Monitoring Recommendation: Don't set it or set it explicitly to TYPICAL 529Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 530. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information Oracle 11.2/12c CONTROL_MANAGEMENT_PACK_ACCESS Values: { DIAGNOSTIC+TUNING | DIAGNOSTIC | NONE } Explanation: Specifies which of the Server Manageability Packs should be active Annotation:  Default Enterprise Edition: DIAGNOSTIC+TUNING  Default Standard Edition: NONE Recommendation: Adjust it according to your license set STATSPACK can still be used but has very limited functionality  STATSPACK Guide : MOS Note:394937.1  Turn of AWR/ASH in case you'll use STATSPACK 530Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 531. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to do right after upgrade  Configure Automatic Workload Repository (AWR) – Data gathered by MMON and stored in SYSAUX – Check settings: – Change settings:  Example: – Retention: 40 days (57600 min) – Interval: 30 minutes – Important scripts in ?/rdbms/admin: SQL> exec DBMS_WORKLOAD_REPOSITORY.MODIFY_ SNAPSHOT_SETTINGS(57600,30) Size and trend: awrinfo.sql AWR report SI: awrrpt.sql AWR report RAC: awrrpti.sql AWR report SQLID:awrsqrpt.sql AWR diff report: awrgrrpt.sql AWR extract: awrextr.sql AWR load: awrload.sql SQL> select * from DBA_HIST_WR_CONTROL; 531Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 532. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Configure AWR, ASH & ADDM  Active Session History (ASH) – Data gathered by MMNL – View: V$ACTIVE_SESSION_HISTORY – Space and time usage:  Fixed size, circular buffer: 2MB x #CPUs (max. 5% SGA or <30MB)  Designed to hold ~1 hour of statistics, may flush or fill sooner  Further info: Note:243132.1 – Important scripts in ?/rdbms/admin: – Needs to be increased for Oracle Multitenant ASH report (single instance): ashrpt.sql AWR extract (RAC): ashrpti.sql _ASH_SIZE 532Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 533. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Configure AWR, ASH & ADDM  Real-Time ADDM – Data gathered by MMON  Every 3 sec without lock/latch  Triggers real-time ADDM analysis –Conditions: – MMON slave process creates report and stores it in AWR  DBA_HIST_REPORTS 533Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 534. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance Checklist 534  Adjust maintenance windows  Configure statistics retention  Configure incremental statistics  Adjust memory and optimizer parameters  Configure AWR, ASH and ADDM  Preserve and transport execution plans  General test guidelines  Real Application Testing  System Statistics  Automatic Tuning Advisor  Enable Performance Features Prepare Stability Test Optimize Features Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 535. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Typical situation after a change  Challenging to "freeze" execution plans Parse Execute Plan acceptable Parse Execute Plan possibly not acceptable Conditions change: New statistics, parameter change, upgrade   535Upgrade, Migrate & Consolidate to Oracle Database 12c GB HJ ...HJ GB NL ...NL
  • 536. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Rule Based Optimizer?  Stored Outlines?  Rewrite plans, tweak parameters, hints …? Strategies to enforce Plan Stability Desupported - MOS Note:189702.1 Deprecated - Documentation You have too much spare time? SQL Plan Management EE Feature - Package: DBMS_SPM 536Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 537. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Plan Management - Mechanism  Phase 1 – Baseline Capture – Set OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE • If OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE then all found plans will be put into the baseline 537Upgrade, Migrate & Consolidate to Oracle Database 12c Parse Execute Plan acceptable  GB HJ ...HJ 2x Plan History SQL MANAGEMENT BASE Residing in SYSAUX TS. Will occupy max. 10% of SYSAUX. Weekly job will delete plans not used since 53 weeks [default]. Before Oracle 12c a massive number of hints get stored – since Oracle 12c entire plans will be kept SQL Profiles Initial plan will be accepted if repeated and will be added to the SQL Plan Baseline Plan Baseline GB HJ ...HJ
  • 538. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Plan Management - Mechanism  Phase 2 - Selection – Same statement parsed again but a different plan will be created 538Upgrade, Migrate & Consolidate to Oracle Database 12c Parse Execute Plan acceptable  GB NL ...NL 2x Plan History Plan Baseline GB HJ ...HJ New plan will be added to the Plan History but it won't be used unless it has been verified GB NL ...NL  OPTIMIZER_USE_SQL_PLAN_BASELINES=TRUE  OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=FALSE  Both switched to their defaults  Annotation: If OCSPB=TRUE then this plan would have been added to the baseline
  • 539. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Plan Management - Mechanism  Phase 3 - Evolution – Since Oracle 12.1.0.2: Optimizer Equal or better plans can be added to the SQL Plan Baseline 539Upgrade, Migrate & Consolidate to Oracle Database 12c New SYS_AUTO_SPM_EVOLVE_TASK job as part of the Automatic SQL Tuning Task Report: DBMS_SPM.REPORT_AUTO_EVOLVE_TASK Manual: DBMS_SPM.CREATE_EVOLVE_TASK Plan History Plan Baseline GB HJ ...HJ GB NL ...NL GB NL HJHJ Plan History Plan Baseline GB HJ ...HJ GB NL ...NL GB NL HJHJ Worse plans will be kept in the Plan History and will get purged
  • 540. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Plan Management  Configure SQL Plan Management (SPM) – Check settings: – Change retention:  Default: 53 weeks – Change space consumption:  Default: 10% of SYSAUX  Plans will be stored in a LOB – Sources to load plans from: SQL> exec DBMS_SPM.CONFIGURE('plan_retention_weeks',5); SQL> select PARAMETER_NAME, PARAMETER_VALUE from DBA_SQL_MANAGEMENT_CONFIG; SQL> exec DBMS_SPM.CONFIGURE('space_budget_percent',5); Load plans from AWR into a SQL Tuning Set 540Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 541. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Stability using Stored Outlines  Capture query outlines on production system  Transfer query plans into the Plan Baseline with DBMS_SPM.MIGRATE_STORED_OUTLINE Upgrade 541Upgrade, Migrate & Consolidate to Oracle Database 12c Plan History Plan Baseline GB HJ ...HJ
  • 542. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Stability using Stored Outlines  Upgrade scenario – In Oracle 9i/10g:  GRANT CREATE ANY OUTLINE TO APPUSER;  ALTER SYSTEM set CREATE_STORED_OUTLINES=MYPLANS;  Now run the statements you'd like to capture  ALTER SYSTEM SET CREATE_STORED_OUTLINES=false;  Check the category (should be MYPLANS): SELECT name, sql_text, category FROM user_outlines; – Upgrade to Oracle 12c  variable repo clob; exec :repo:=DBMS_SPM.MIGRATE_STORED_OUTLINE( attribute_name=>'CATEGORY', attribute_value=>'MYPLANS'); 542Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 543. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Stability using Plan Capture STS  STS  Plans will be taken from STS and added to the SQL Plan Baseline DBMS_SPM.LOAD_PLANS_FROM_SQLSET Upgrade Load plans from AWR into a SQL Tuning Set 543Upgrade, Migrate & Consolidate to Oracle Database 12c Plan History Plan Baseline GB HJ ...HJ
  • 544. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Stability using Plan Capture  Upgrade scenario example: Capturing from Cursor Cache – BEGIN SYS.DBMS_SQLTUNE.CREATE_SQLSET( sqlset_name=>'SPM_STS',description=>'10.2 plans'); END; / DECLARE stscur dbms_sqltune.sqlset_cursor; BEGIN OPEN stscur FOR SELECT VALUE(P) FROM TABLE(dbms_sqltune.select_cursor_cache( 'parsing_schema_name<>''SYS''',null,null,null,null,1,null,'ALL')) P; -->> Populate the SQL Tuning Set dbms_sqltune.load_sqlset(sqlset_name=>'SPM_STS',populate_cursor=>stscur); END; / SQL> variable cnt number SQL> exec :cnt := DBMS_SPM.LOAD_PLANS_FROM_SQLSET(sqlset_name=>'SPM_STS'); 544Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 545. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Transport Exp/imp staging table to target system Staging Table   DBMS_SPM. CREATE_STGTAB_BASELINE DBMS_SPM. PACK_STGTAB_BASELINE DBMS_SPM. UNPACK_STGTAB_BASELINE @Vendor @Customer  545Upgrade, Migrate & Consolidate to Oracle Database 12c Plan History Plan Baseline GB HJ ...HJ Plan History Plan Baseline GB HJ ...HJ
  • 546. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SPM – Plan Transport  Transporting SPM baselines between test and production databases – @Test System:  Create a staging table using DBMS_SPM.CREATE_STGTAB_BASELINE  Pack the required baselines into the staging table using DBMS_SPM.PACK_STGTAB_BASELINE  Export the staging table into a dump file using Data Pump Export and transport it to the destination system – @Production System:  Import the dump file into the destination database  Unpack the SQL Plan Baselines from the staging table into the SQL Management Base of the target system – DBMS_SPM.UNPACK_STGTAB_BASELINE 546Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 547. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Plan Management  White Paper: – http://www.oracle.com/technetwork/database/bi-datawarehousing/twp- sql-plan-mgmt-12c-1963237.pdf  MOS Notes: – MOS Note:456518.1 SQL Plan Management – Example – MOS Note:789888.1 How to load plans from AWR into SPM – MOS Note:801033.1 How to move 10.2 plans into 11g SPM 547Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 548. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance Checklist 548  Adjust maintenance windows  Configure statistics retention  Configure incremental statistics  Adjust memory and optimizer parameters  Configure AWR, ASH and ADDM  Preserve and transport execution plans  General test guidelines  Real Application Testing  System Statistics  Automatic Tuning Advisor  Enable Performance Features Prepare Stability Test Optimize Features Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 549. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | General Test Guidelines Upgrade/Migration Process Post-Upgrade Functionality Post-Upgrade Performance ProdLoad 549Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 550. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Testing Effort  Relation between test completeness and costs Costslow high Completeness0%100% Upgrade, Migrate & Consolidate to Oracle Database 12c 550
  • 551. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real Application Testing  Record a workload and replay it  Find plan regressions prior to a change  Multitenant: MOS Note:1937920.1 – Setup/Run Replay in Multitenant Real Application Testing  Available since Oracle Database 11.1.0.6  Available also with patch sets Oracle Database 10.2.0.4/5 SQL Performance Analyzer (SPA) DBMS_SPA Gathering ≥ 9i Evaluation ≥ 10.2.0.4 Database Replay DBMS_WORKLOAD_CAPTURE DBMS_WORKLOAD_REPLAY Capture ≥ 9.2.0.8 Replay ≥ 11.1.0.7 551Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 552. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Replay Database Replay Migrate R2 10.2.0.4 11.2.0.4 Capture Workload Replay Workload Compare – then restore and run again with changes IBM AIX SOLARIS Preprocess Workload 552Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 553. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Database Replay: Analysis & Reporting  Error Divergence: For each call error divergence is reported – New: Error encountered during replay not seen during capture – Not Found: Error encountered during capture not seen during replay – Mutated: Different error produced in replay than during capture  Data Divergence – Replay: Number of rows returned by each call are compared and divergences reported – User: Application level validation scripts  Performance Reporting – Capture and Replay Report: Provides high-level performance information – ADDM Report: Provides in-depth performance analysis – AWR, ASH Report: Facilitates comparative or skew analysis 553Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 554. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Consolidated Database Replays  Allows workload captured on different databases to be consolidated for replay  Works for manually consolidated databases or Pluggable Databases Validating consolidation strategies SALES HR ERP CRM Upgrade, Migrate & Consolidate to Oracle Database 12c 554
  • 555. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Performance Analyzer SQL Performance Analyzer STS Capture SQLs into a STS Load STS STS Evaluate, compare and tune – over and over again! Migrate R2 10.2.0.4 12.1.0.2 IBM AIX SOLARIS 555Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 556. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Resulting Reports  Example: Report showing regressed statements and plans 556Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 557. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 557 Hundreds of Databases Using Real Application Testing Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 558. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Real World Checkpoint  CSX – One of the nation‘s leading transportation suppliers  Encompasses 21,000 miles of tracks in 23 states, from Florida to Ontario  HQ in Jacksonville, Florida Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 558
  • 559. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Upgrade and migration of 304 databases to 11.2.0.2 over a 24 month period (2011-2012) – 1/3 production, 2/3 test and development systems – Source versions: Oracle 10.2.0.4 and a few Oracle 8i/9i – Single Instance on IBM AIX  RAC on Linux  Plan to use Real Application Testing – Guarantee quality and mitigate the risk of upgrading  Define standards – Install 11.2.0.2 and patches and apply latest PSU Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 559
  • 560. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Limited downtime on some business critical systems  Testing cycles vary from 1-6 months depending on complexity and criticality  Tight on available testing resources – Time – People – Systems  New to Real Application Testing Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 560
  • 561. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Close alliance with Oracle's Upgrade Development Group and Oracle's RAT Pack – CSX agreed to become an official Oracle Database 11.2 Reference Customer  Monthly status meetings  Onsite training  Live upgrade and RAT demo – Cloning databases methods for use with RAT Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 561
  • 562. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Upgrade and migration methods used:  Policy: – Install Oracle SW with latest patches and PSU – Combine HW refresh and OS upgrades  Internal application to track owner, status, success 80% 20% Data Pump for OS Migration DBUA for Upgrades Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 562
  • 563. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  Yes –project took 2 years – 88% of all databases upgraded within 18 months – Some systems took longer due to business and/or resource constraints  Performance comparison mechanisms are very helpful  Regressions found and fixed before upgrade  RAT helped a lot to predict workload performance and ensure careful testing Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 563
  • 564. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  “The Real Application Testing tool provided a comprehensive and flexible solution for assessing the impact of the Oracle 11g database upgrade into CSX systems. At CSX we were able to capture real production workloads, replay it in the 11g environment, identify poor performing queries and, fine tune these queries in a test environment before the production implementation.“ Maritza Gonzalez, Technical Director CSX Corporation Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 564
  • 565. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |  More Information? https://blogs.oracle.com/UPGRADE/entry/csx_corporation_upgrades_databases_2x Real World Checkpoint Customer Project Constraints Preparation Upgrade Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 565
  • 566. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Use the Right Testing Tools Upgrade, Migrate & Consolidate to Oracle Database 12c 566 Predictable Upgrades SQL Plan Management Database Replay SQL Performance Analyzer SQL Tuning Advisor
  • 567. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Testing Tools – Hand-in-Hand Upgrade, Migrate & Consolidate to Oracle Database 12c 567 Collect execution plans before upgrade Verify them with SQL Performance Analyzer Regressed plans? SQL Plan Management SQL Tuning Advisor Verify functionality and performance with Database Replay
  • 568. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance Checklist 568  Adjust maintenance windows  Configure statistics retention  Configure incremental statistics  Adjust memory and optimizer parameters  Configure AWR, ASH and ADDM  Preserve and transport execution plans  General test guidelines  Real Application Testing  System Statistics  Automatic Tuning Advisor  Enable Performance Features Prepare Stability Test Optimize Features Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 569. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Gather Workload Statistics  Gather system statistics during a regular workload period:  Revert to the defaults: SQL> select pname NAME, pval1 VALUE, pval2 INFO from AUX_STATS$; NAME VALUE INFO -------------------- ---------- ------------------------------ STATUS COMPLETED DSTART 04-03-2011 12:30 DSTOP 05-03-2011 12:30 FLAGS 1 CPUSPEEDNW 2498,65 IOSEEKTIM 11,405 IOTFRSPEED 25595,605 ... SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('start'); << Run it for several hours on a workload – does not generate overhead!!! >> SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('stop'); Best Practice° ° ° ° SQL> exec DBMS_STATS.DELETE_SYSTEM_STATS; 569Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 570. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Gather Workload Statistics  Calibrate I/O (Orion): Example – This is a requirement for AUTODOP (automatic degree of parallelism in 11.2.0.2) – in addition PARALLEL_DEGREE_POLICY must be set to AUTO  Exadata: SET SERVEROUTPUT ON DECLARE lat INTEGER; iops INTEGER; mbps INTEGER; BEGIN DBMS_RESOURCE_MANAGER.CALIBRATE_IO (28, 10, iops, mbps, lat); DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops); DBMS_OUTPUT.PUT_LINE ('latency = ' || lat); DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps); end; / INFO° ° ° ° SQL> exec DBMS_STATS.GATHER_SYSTEM_STATS('EXADATA'); 570Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 571. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Workload Stats: Further Information  See the Oracle 11.2 Performance Tuning Guide for all stats: – http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/stats.htm#PFGRF94743 – See also: – 13.4.1.2 Multiblock Read Count If you gather workload statistics, then the mbrc value gathered as part of the workload statistics is used to estimate the cost of a full table scan. However, during the gathering process of workload statistics, Oracle Database may not gather the mbrc and mreadtim values if no table scans are performed during serial workloads, as is often the case with OLTP systems. However, full table scans occur frequently on DSS systems but may run parallel and bypass the buffer cache. In such cases, Oracle Database still gathers the sreadtim value because the database performs index lookup using the buffer cache. – If Oracle Database cannot gather or validate gathered mbrc or mreadtim values, but has gathered sreadtim and cpuspeed values, then the database uses only the sreadtim and cpuspeed values for costing. In this case, the optimizer uses the value of the initialization parameter DB_FILE_MULTIBLOCK_READ_COUNT to cost a full table scan. However, if DB_FILE_MULTIBLOCK_READ_COUNT is not set or is set to 0 (zero), then the optimizer uses a value of 8 for costing. INFO ° ° ° ° 571Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 572. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Gather Workload Statistics Oracle Database 10g/11g only  Gather fixed objects statistics during regular workload 1 week after upgrade: – Will gather stats on X$ structures – Redo it 4x per year with a job  Findings: – MMON may cause too much CPU load if fixed objects stats haven't been generated – Internal recursive queries perform better  Not necessary anymore in Oracle Database 12c as it is included in the Auto Stats Gathering Job : SQL> exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; Best Practice° ° ° ° 572Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 573. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information  _OPTIMIZER_IGNORE_HINTS – Values: TRUE | FALSE – SQL hints that worked in one release may not work in another – Test all SQL statements with hints on the new release using the parameter  Chances are high that SQL statements will perform better without any hints 573Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 574. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information  OPTIMIZER_USE_INVISIBLE_INDEXES – Values: TRUE | FALSE – Background: With modern IO systems full table scans might be more efficient than index lookups – but dropping and recreating an index is expensive. By making an index invisible to the optimizer the effect on query performance can be detected before it affects production users. This is extremely beneficial in an Exadata environment. – Example: ALTER INDEX idx_ename ON emp(ename) INVISIBLE; ALTER SESSION SET OPTIMIZER_USE_INVISIBLE_INDEXES=TRUE; 574Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 575. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Parameter Information  CELL_OFFLOAD_PLAN_DISPLAY – Values: TRUE | FALSE – Background: Will display you potential savings with a cell storage – STORAGE indicates which parts of the query could be offloaded to the storage cells using smart scan – Example: ------------------------------------------- | Id | Operation | Name | ------------------------------------------- | 0 | SELECT STATEMENT | | | *1 | HASH JOIN | | | *2 | HASH JOIN | | | *3 | TABLE ACCESS STORAGE FULL | SALES | | *4 | TABLE ACCESS STORAGE FULL | SALES | | *5 | TABLE ACCESS STORAGE FULL | SALES | 575Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 576. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Real-Time Monitoring  Only source of truth to monitor the real execution plan – Part of Tuning Pack license – MOS Note:1229904.1: Real-Time SQL Monitoring in 11g – DBMS_SQLTUNE.REPORT_SQL_MONITOR() allows to display monitoring information – SET AUTOTRACE TRACE does not show the "real" plan in some cases – Target:  Parallel queries, parallel DML or parallel DDL  Execution that exceeds 5 sec of CPU or I/O time – Global SQL level statistics are collected: V$SQL_MONITOR – Plan level statistics are collected (#rows, memory, temp space, start/end date): V$SQL_PLAN_MONITOR – Statistics are updated quasi real-time while the query executes – Statistics for completed executions are retained for at least 5 minutes – Feature switched on by default 576Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 577. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Manual vs Automatic SQL Tuning Manual SQL Tuning • Complex • Time consuming • Never-ending task Advisors Since 10g - improved in 11g SQL Tuning Advisor • Can operate on a single SQL • Optimizer in Comprehensive Mode • Potential recommendations: • SQL Profiles • Indexes SQL Access Advisor • Requires a workload (+50 sql) • Potential recommendations: • Indexes • Materialized Views • Indexes on MVs • Partitioning Advisor Automatic SQL Tuning Since 11g 577Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 578. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Tuning Advisor  Can be used in EM or on CLI (via DBMS_SQLTUNE) – Part of Tuning Pack since Oracle 10g – SQL Profiles contain information that lead to improved execution plans without changing the application code  Use different optimizer settings  Correct wrong/missing statistics and wrong estimates  SQL Profiles don’t change the original SQL statement  SQL Profiles are persistent  SQL Profiles can be transported within SQL Tuning Sets (STS) – See Note:751068.1 for an example  SQL Profiles can be tested and verified without any risk 578Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 579. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Tuning  Example: Results of SQL Tuning Advisor  SQL Profile   579Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 580. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Tuning  Example: Compare original to new explain plan   580Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 581. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Tuning Task Command Line Example exec DBMS_SQLTUNE.DROP_TUNING_TASK('my_tuning_task'); DECLARE my_task_name VARCHAR2(30); my_sqltext CLOB; BEGIN my_sqltext := q'!<your SQL - concatenate lines with ||>!'; my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_text => my_sqltext, user_name => XY,scope => 'COMPREHENSIVE',time_limit => 60, task_name => 'my_tuning_task', description => 'test'); END; / exec DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_tuning_task' ); SELECT sofar, totalwork FROM V$ADVISOR_PROGRESS WHERE task_id = (SELECT task_id FROM USER_ADVISOR_TASKS WHERE task_name='my_tuning_task'); SET LONG 100000 SET LONGCHUNKSIZE 100000 SET LINESIZE 10000 SET PAGESIZE 10000 SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_tuning_task') FROM DUAL; 581Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 582. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Profile containing literals - not binds  SQL Profiles can handle statements containing literals (instead of binds) as well: – Since 11.1.0.6 possible in EM: – In 10.2 only possible on command line: SQL> select name, status, force_matching, sql_text rom dba_sql_profiles; NAME STATUS FOR SQL_TEXT ------- -------- ---- -------------------------------------------- MY_PROF ENABLED YES select /*+ use_nl(c) ordered */ count(*) from sh.sales s, sh.customers c where c.cust_id = s.cust_id and CUST_FIRST_NAME = 'Mike' exec :p_name:=dbms_sqltune.accept_sql_profile (task_name=>'XT',name=>'XT_PROFILE', FORCE_MATCH=>TRUE); 582Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 583. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Profile - evaluation  SQL Profiles should be evaluated before making them available to every user: – Now evaluate the statement's profile in a limited user context – If verification went fine, make it accessible to everybody exec :p_name:=dbms_sqltune.accept_sql_profile task_name=>'XT',name=>'XT_PROFILE', category=>'TEST_ENV', FORCE_MATCH=>TRUE) alter session set SQLTUNE_CATEGORY='TEST_ENV'; exec dbms_sqltune.alter_sql_profile (name=>'XT_PROFILE', attribute_name=>'CATEGORY',value=>'DEFAULT') 583Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 584. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SQL Tuning Automation in 11g  Configure Automatic SQL Tuning  Package: DBMS_AUTO_SQLTUNE 584Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 585. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | It’s Automatic! Choose Candidate SQLone week SQL Tuning Automation since Oracle Database 11g Workload SQL Tuning Candidates Test SQL ProfilesImplement SQL Profiles Generate Recommendations AWR DBA View Reports / Control Process 585Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 586. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Deutsche Messe AG – HQ in Hannover, Germany – Largest trade fair worldwide – Key trade fairs:  CeBIT  Hannover Messe – ~1,000,000 m² exhibition space Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 586
  • 587. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c  Upgrade of a 3-node Oracle 10.2.0.3 RAC Cluster to Oracle 11.1.0.7 – Move from raw devices to ASM – Use Snapshot Standby instead of RMAN to refresh development databases – Tune third-party application with Automatic SQL Tuning – Sun Solaris 10  Initially 2 databases to upgrade (each ~350GB): – CeBIT system – Online ordering web application Real World Checkpoint Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 587
  • 588. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Keep the old hardware  The "worst" application ever ... Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 588
  • 589. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Performance: – AWR snapshots – Automatic SQL Tuning showed excellent results – Real Application Testing (Database Replay) done during high-load phase during CeBIT 2009 Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 589
  • 590. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Upgrade – Data Pump used for upgrade, consolidation and reorganization – Everything went well ... until ...  Right at the end of impdp run the cluster node went down and was restarted  Reason: EM Agent was going amok and requested all available RAM and swap until Clusterware cleaned up the situation by a restart – Remedy: Upgrade the agents to the version matching your Grid Control !!! Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 590
  • 591. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  Live? And alive? – Yes! Go-live in September and October 2009  But highest load to be expected in March 2010 (CeBIT!!) – Overall downtime: 4 hrs – Application is faster than ever – Customer kept 3 year old hardware – All SAP systems recently upgraded to 11.2.0.3  More information: OOW 2010 presentation and Success Story – http://apex.oracle.com/pls/apex/f?p=202202:2:::::P2_SUCHWORT:messe – http://www.oracle.com/us/corporate/customers/deutsche-messe-1-db-snapshot- 367194.pdf Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 591
  • 592. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Real World Checkpoint  "Heal" a terrible application Improvement factor: ~250,000x !!! Customer Project Constraints Preparation Migration Success? Remarks Upgrade, Migrate & Consolidate to Oracle Database 12c 592
  • 593. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Performance Checklist 593  Adjust maintenance windows  Configure statistics retention  Configure incremental statistics  Adjust memory and optimizer parameters  Configure AWR, ASH and ADDM  Preserve and transport execution plans  General test guidelines  Real Application Testing  System Statistics  Automatic Tuning Advisor  Enable Performance Features Prepare Stability Test Optimize Features Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 594. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | AUTODOP – Automatic Degree of Parallelism  AUTODOP was introduced in Oracle 11.2.0.2 – Oracle 12c does not require I/O calibration anymore  Default value of 200MB/sec IO rate will be used instead – I/O calibration (Orion): – Since Oracle 12c: IO and CPU taken into consideration  11g: Only IO was used – Enabled by setting init parameter: SET SERVEROUTPUT ON DECLARE lat INTEGER; iops INTEGER; mbps INTEGER; BEGIN DBMS_RESOURCE_MANAGER.CALIBRATE_IO (84, 10, iops, mbps, lat); DBMS_OUTPUT.PUT_LINE ('max_iops = ' || iops); DBMS_OUTPUT.PUT_LINE ('latency = ' || lat); DBMS_OUTPUT.PUT_LINE ('max_mbps = ' || mbps); end; / SELECT * FROM DBA_RSRC_IO_CALIBRATE; SQL> ALTER SESSION SET PARALLEL_DEGREE_POLICY=AUTO; 594Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 595. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Automated Degree of Parallelism How it works SQL statement Statement is hard parsed And optimizer determines the execution plan Statement executes serially Statement executes in parallel Optimizer determines ideal DOP If estimated time greater than threshold Actual DOP = MIN(default DOP, ideal DOP) If estimated time less than threshold PARALLEL_MIN_TIME_THRESHOLD 595Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 596. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Adaptive Cursor Sharing  Adaptive cursor sharing introduced in 11g  Common problem: – When bind variables are used, the initial plan can be suboptimal due to the fact that  Future values used in future executions share the initial plan  The first set of binds used may not be representative of the majority of executions – For explanation and examples see Note:740052.1 and Note:836256.1  This feature monitors the execution statistics for candidates queries and makes it possible for the same query to generate and use different execution plans for different set of binds values  Parameter: _optimizer_adaptive_cursor_sharing=FALSE|TRUE 596Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 597. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | PL/SQL Native Compilation  Since Oracle 11g it's easier, cheaper, faster – No directory object needed: compiled library resides in database – No external compiler required – no extra license costs! – Can speed up PL/SQL performance (results may vary) – Just two PL/SQL native compilation parameters to set:  PLSQL_CODE_TYPE=NATIVE  PLSQL_OPTIMIZE_LEVEL=3 – Then recompile the schemas:  SQL> exec DBMS_UTILITY.COMPILE_SCHEMA('<username>'); 597Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 598. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | SecureFiles  SecureFiles = new LOB storage technology – Better performance – Additional features: deduplication, encryption  Examples: – Tablespace must be ASSM managed – Initialization parameter: • CREATE TABLE t1 (a CLOB); -- this will be a Securefile!!! CREATE TABLE t1 (a CLOB) LOB(a) STORE AS SECUREFILE; CREATE TABLE t2 (a CLOB) LOB(a) STORE AS SECUREFILE DEDUPLICATE); CREATE TABLE t3 (a CLOB ENCRYPT USING 'AES128') LOB(a) STORE AS SECUREFILE (CACHE); DB_SECUREFILE = [NEVER | PERMITTED | PREFERRED | ALWAYS | IGNORE] 598Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 599. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | LONG/LOB  SecureFile Conversion  LONG and BasicFiles LOB data types are still supported – But they have many limitations (size, performance, operations)  SecureFiles are fully transparent to applications! – Data type still a LOB --- No functional differences --- API access via PL/SQL (DBMS_LOB), JDBC, .NET, PHP  2 conversion options: LONG LONG RAW CLOB BLOB SecureFile LOB Data Pump Import (12c) using: TRANSFORM=LOB_STORAGE:SECUREFILE TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y White Paper: http://www.oracle.com/technetwork/database/securefilesmigrationpaper-130440.pdf DBMS_REDEFINITION  MOS Note:728758.1 How to online convert from BasicFiles to SecureFiles  http://docs.oracle.com/cd/E11882_01/appdev.112/e18294 /adlob_smart.htm#ADLOB45231  Data always online - can be done in parallel 599Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 600. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Compression Oracle 8i: Index Compression Oracle 9i: Table Compression for DWH Oracle 11g: Advanced Compression Oracle 11g: Hybrid Columnar Compression CREATE TABLE comp_basic... COMPRESS [BASIC] CREATE TABLE comp_oltp... COMPRESS FOR OLTP CREATE INDEX emp_idxcomp ... ON emp(job,ename) COMPRESS 1; CREATE TABLE comp_hccq... COMPRESS FOR QUERY LOW|HIGH; CREATE TABLE comp_hccq... COMPRESS FOR ARCHIVE LOW|HIGH; 600Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 601. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Compression Overview  http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN13059 601Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 602. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Advanced Compression  Advanced Compression since Oracle 11g works for: – All types of data – Backup  New RMAN compression algorithm – Data Pump exports – Data Guard gap resolution and LGWR ASYNC transport  Reduces resource requirements and costs!!! – Storage & Performance 602Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 603. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Advanced (OLTP) Compression  http://www.oracle.com/technetwork/database/focus-areas/storage/advanced- compression-whitepaper-130502.pdf 603Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 604. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Advanced Compression  Compression Advisor – DBMS_COMPRESSION since Oracle 11.2 – Download for earlier releases: http://www.oracle.com/technetwork/database/options/compression/index.html  Migration in Oracle Database 12c: – Data Pump import TRANSFORM=TABLE_COMPRESSION_CLAUSE:<clause> 604Upgrade, Migrate & Consolidate to Oracle Database 12c exec DBMS_COMPRESSION. GET_COMPRESSION_RATIO (<parameters here>)
  • 605. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Hybrid Columnar Compression (HCC)  Available only on Exadata, ZFS and Pillar Axiom 600 Storage – WP: http://www.oracle.com/technetwork/middleware/bi-foundation/ehcc-twp-131254.pdf – No extra license required – For historical data getting VERY LITTLE changes – Compression ratio is very high – How it works:  Tables are organized into Compression Units (CUs) – CUs are larger than database blocks  Within Compression Units, data is organized by column instead of by row – Column organization brings similar values close together, enhancing compression Compression Unit 10x to 15x Reduction 605Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 606. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Hybrid Columnar Compression (HCC)  Compression Units – Logical structure spanning multiple database blocks – Data organized by column during data load – Each column is compressed separately – All column data for a set of rows stored in compression unit CU HEADER BLOCK HEADER BLOCK HEADER BLOCK HEADER BLOCK HEADER C3 C4 C1 C2 C7 C5 C6 C8 C8 Logical Compression Unit 606Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 607. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate 1 2 3 4 5 Introduction Preparation Steps Upgrade / Migrate / Consolidate Fallback Strategies New Features Performance Management Wrap Up 607Upgrade, Migrate & Consolidate to Oracle Database 12c | 6 7
  • 608. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Consolidation Planning Service – Identifies optimal scenario and lowers risk – Analysis of key parameters and components – Comprehensive consolidation plan – Detailed projections and recommendations Migration Service – Fast and safe database migration, optimization – Planning, validation, upgrade, migration – Migration of huge, complex databases (also SAP environments) in a single weekend – Compression of up to 70% for better performance 608 Load Testing & Analysis Service – Evaluates impact of planned technology change – Proactive risk identification – Comprehensive testing solution – SQL and Oracle database workload analysis Performance Tuning & Benchmark Service – Maintains optimal performance over time – Quarterly assessments and monitoring of KPIs – Best practice recommendations – Database tuning Advanced Customer Support - Lifecycle Support Fast, Safe, Efficient; Delivered via Gateway or Onsite
  • 609. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Advanced Customer Support - Lifecycle Support  Features – Database migration, tuning, improvements  Compression, reorganization, implementation of further options, version jumping – Delivered via secure gateway or onsite  Benefits – Fast, efficient, safe change – Optimized database – Better performance – Risk prevention  Long-Term Experience – More than 2,000 migrations in 12 years Centrica, UK Migration of 4 large databases in SAP environment with minimal downtime Endesa, Spain Datacenter transformation, migration, preproduction testing, implementation Learn more here
  • 610. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Consulting Migration Factory: over 25% reduction in database upgrade & migration cost and duration (- 40% in Factory effort) IT landscape for Oracle / Non-Oracle Database and Operating System is very common Benefit of DB12c and Multitenant Architecture  Higher DB performance and System reliability  DB-OS-HW layers fully integrated, TCO reduction and ROI in shorter time  More functionality already available as default setup (i.e.Security)  Less DB Administration (manage many as one), DBAs can move to the next level Upgrade, Migrate & Consolidate to Oracle Database 12c Upgrade, Migrate & Consolidate on DB12c Current Data Center Oracle DB v.11 v.10 v. 9 v. 8 New Data Center Multitenant Database share servers, OS and database Consolidation DB Migration Factory delivers breakthroughs in standardization and automation – like an assembly line vers.12c 610
  • 611. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c EMEA OC and MF Key Contacts Cluster Database Local Consulting Contact EMEA overall Ruud Riemslag / Luigi Villa / Mahesh Rao / Jo Pugh Nordics Simon Mørup-Petersen Benelux Ton van Kooten DE/CH Lajos Hodi France Claudine Millet Italy David Cavanna Iberia Anna Moreu UK, Ireland Andy Higgins Ecemea- Marcel Straka Israel Eran Singer Central Michael Hoffman GR+NA Alkis Nikolaidis / Sherif Mourad EG+AO Sherif Mourad MEO Anil Almeid Saudi Ahmad Al-Amer Turkey Fatih Kilic South Africa Janak (Bob) Desai Luigi VillaRuud Riemslag Mahesh RaoJo Pugh Emea Migration Factory CoreTeam MF Offshore Database Solution Components Owners: Bala (Balasubramanian Meyyappan): Oracle DB, GoldenGate, DB Testing Shailendra (Shailendra Surywanshi): Non-Oracle to Oracle DB Girish (Girish Narasanna): DB migration Estimation Srini (Srinivas Thella): DB Application Readiness Assessment 611
  • 612. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Upgrade, Migrate & Consolidate to Oracle Database 12c Oracle Database 12c Training Next Steps: Develop your skills with available training offerings Key Oracle Database 12c Courses Oracle Database 12c Curriculum  Oracle Database 12c: New Features for Administrators  Oracle Database 12c: Administration Workshop  Oracle Database 12c: Install and Upgrade Workshop  Oracle Database 12c: Managing Multitenant Architecture  Oracle Database 12c: High Availability New Features  Oracle Database 12c: Global Data Services  Oracle Database 12c: Data Guard Administration – Coming Soon!  Oracle Database 12c: Performance Management and Tuning – Coming Soon!  Oracle Database 12c: Clusterware Administration – Coming Soon!  Oracle Database 12c: ASM Administration – Coming Soon!  Oracle Database 12c: RAC Administration – Coming Soon! For more information on training and certification offerings available, please go to: http://education.oracle.com/database12c 612
  • 613. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Resources  Download slides from: – http://blogs.oracle.com/UPGRADE Upgrade, Migrate & Consolidate to Oracle Database 12c 613
  • 614. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Issues to be aware of  DBUA Upgrade moving files – BUG 18312660 - 12C DBUA OVERWRITES DATAFILES WHEN "MOVE DATABASES FILES AS PART OF UPGRADE"  Transportable Tablespaces Migration – BUG 16396856 - HANG - SINGLE USER OPERATION  Note: 1560225.1 Transportable Tablespace (TTS) Using Impdp Seems to Hang at TRANSPORTABLE_EXPORT/PLUGTS_BLK Phase  Exadata 12.1.0.2 – Bug# 18925767 - INSTANCES WON'T START IN CLUSTER W/NODES USING EXAFUSION AND NON-EXAFUSION IPC  Workaround: alter system set "_exafusion_enabled" = false scope = spfile;  XML Upgrade Issue: – Bug 18482096 - [ORA-01917: USER OR ROLE 'ANONYMOUS' DOES NOT EXIST FROM 11202 TO 12102 614Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 615. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Change Log 1 – Feb 4, 2014 – Nov 19, 2014  4-Feb-2014 – Added slide 231 [hidden] for EBS specific resources – Added QR codes for the blog – Added OU slides at the end plus generated QR code  12-Feb-2014 – Changed the Bielefeld University Transient Rolling Upgrade case to clarify the Transient Component  19-Feb-2014 – Added to slide 166: MOS Note:1617946.1 (Standby Duplication from Active Database) – Added slide 328 with PDB_PLUG_IN_VIOLATIONS – Added hidden slide 320 – CDB/PDB charactersets – Added slide 326 – Backup/Recovery – Slide 322: Changed the Resource Manager example  5-MAR-2014 – Added hidden slide 198: Data Pump COMPRESSION_ALGORITHM with example BASIC vs MEDIUM  8-APR-2014 – Added several Notes to slide 161 (Exadata 12c)  16-APR-2014 – Slide 61: Update to 11.2.0.4 for NOTE Poor Performance ( Wrong Query Result Bugs) – Slide 315: Changed order of upgrade (SEED now together with PDBs) in accordance with the spec – Slide 33: Changed query to detect DUP objects to a more efficient version – credits to Tom Kyte!  22-MAY-2014 – Added WHOAMI slide for Ro, moved Mike’s WHOAMI to front – Slide 9: Moved current time arrow forward a bit – (deleted “Time to upgrade?” slide with cell phones) – Slide 52: Updated screenshot – (deleted “Establish a Maintenance Strategy” slide) – Slide 61, 63, 66, 67: Updated screenshots – Slide 115, 190-193, 278: Changed OL6 to OL 5.8 to match certifications available for older releases – Slide 151: Slide wording change for Orachk/RACchk – Slide 231: Some wording changes such as “brutal” -> “brute force” and “The smart approach” -> “A same-OS approach” – Slides 260-267, 277-279: changed “5 min” to “<5 min” – Slide 281: Added animation step to have entire diagram reappear at the end – Slide 282: Added emphasis around “Made Easy” – Slide 327: Updated slide with DMU 2.0 information – Slide 337: Updated font to be more visible for 12c beta, RC6, etc. – Slide 338, 339, 345, 349: Slide wording updates – Slide 375: Hidden by default – Slide 401: Fixed typo “Partitoned” -> “Partitioned” – Slide 407: added link to SQL Tuning Guide – Slide 432: Changed DBMS_SPM to DBMS_SPA  3-JUN-2014 – Slide 488 added: Credits – Slide 485 added: Issues (collector slide for known issues to be aware of) – Slide 424/421: changed sources for plans / removed transport option, changed STS to "AWR into STS"  7-JUL-2014 – Slide 442: Manual Fixed Objects Stats Gathering is not necessary in Oracle 12c anymore as it is included in the Auto Stats Gathering job – Slide 238: Added EBS Cert information – Slide 309: Added information about remote cloning in PSU3 for 12.1.0.1  2-Sep-2014 – Slide 81: Updated Unified Auditing information  10-Sep-2014 – Slide 137: NEW – RMAN catalog upgrade 12.1.0.2 – Slides 435-437, 438, 441, 443 (SPM) – redesigned and updated for 12.1.0.2 – Slide 13: New about Oracle 12.2  12-Oct-2014 – Exchanged several slides with slides from our OOW 2014 talk – Slide 60ff: updated flow with 12.1.0.2 information – Slide 169: GIMR information for 12.1.0.2 added  28-OCT-2014 – Slide 75 (hidden): Solaris performance regressions – Slide 93 (hidden): _optimizer_aggr_groupby_elim – Slide 45: (now hidden) MOS Note for cleanup does not exist anymore – offered a script to cleanup – Slide 45: Query connection . Left parenthesis was missing – Slide 92: Added link to the doc explaining INLINE LOB usage and row chaining pitfall with Extended Varchar  13-NOV-2014 – Slide 89: NEW – job_queue_processes – Slide 100 – NEW – graph slide – Slide 103: Changed Screenshot to fit for Oracle 12.1.0.2 – Slide 182: ASM on NFS  https://docs.oracle.com/cd/E11882_01/install.112/e47689/app_nas.htm#LADBI1372 --- and MOS 1570073.1 – Slide 335: Added FORCE LOGGING clause to the PDB Standby Slide – does not work right now due to bug:18902135 – Slide 353: Added Oracle Fail Safe and Flashback Pluggable Database – Slide 396: NEW – Statistic Enhancements in Oracle 12c – Slide 428: Added ESTIMATE PERCENTAGE – Slide 425 NEW: graph slide – Slide 430 NEW: In 12c Inc Stats have a way smaller footprint on disk in WRH$ tables + Inc Stats work with Partitioned Exchange + Stale percentage – Slide 431: NEW DBMS_STATS.REPORT … – Slide 432: NEW DBMS_STATS.Report – Slide 435: NEW _run_everything_fast=true – Slide 447: Added the information that before 12c only hints got stored but since 12c entire plans will be kept  19-NOV-2014 – Slide 277: Exchanged OGG Link on OTN with Zero Downtime OGG White Paper Link Upgrade, Migrate & Consolidate to Oracle Database 12c 615
  • 616. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Change Log 2 – Dec 9, 2014 – May 27, 2015  9-Dec-2014 – Slide 95: New parameter added to switch InMem completely off – Slide 395: Free (not in ASO anymore) Security Features in 12c – Slide 86: SQLNET.ALLOWED_LOGON_VERSION_SERVER  changed to 10.2.0.5 and the error number – Slide 202: Interhyp Exadata Case: Added MOS Note that Exa BPs are supported in non Exa envs – Slide 322-324: Changed designed, added c##-overwrite parameter from 12.1.0.2 – Slide 65: corrected 12.1.0.1 note number  Now 12.1.0.2 – Slide 67ff: updated screenshots – Slide 441: optimizer_dynmamic_sampling – added info that it has value 11 option since Oracle 11.2.0.4 – but with less functionality than in 12c – Slide 162 – added note 759868.1 (How to step down from RAC to non-RAC) just in case …  21-JAN-2015 – Slide 5: Removed – Slide 505: AutoDOP: Changed to accommodate 12c behavior – credits to Yasin Baskan – Slide 316: Added deprecation of non-CDB architecture – Slide 353: Added more deprecated features for Multitenant  6-Feb-2015 – Slide 356: Added Flashback Transaction Backout to the list of unsupported CDB features – Slide 326: Added new White Paper about Security Concepts in Oracle Multitenant http://www.oracle.com/technetwork/database/multitenant/learn-more/multitenant-security-concepts-12c-2402462.pdf – Slide 162: Reversed order and added Windows Remote Registry info at the buttom with link to Ms Technet – Slide 182 (hidden): Added 10.2. Support Note on Exadata - 1965897.1 - Oracle Database 10g Release 2 Support on Exadata – Slide 183: (hidden) Added MOS Note:1681467.1 GI and Database Upgrade from 11.2.0.2-4, 12.1.0.1 to 12.1.0.2 on Exadata and MOS Note:1364356.2 Info Center Upgrade – Slide 59 – Newly added with MOS Note https://support.oracle.com/epmos/faces/DocumentDisplay?id=1962125.1 Patching Delivery Methods – Slide 7/8 – adjusted content to reflect End of Premier Support  7-Feb-2015 – Slide 94: Fixed Doc ID of the support note for the related bug – Slide 106: Added reference to Lifecycle Management Pack – Slide 279: Softened the wording about zero-downtime upgrades so note that GoldenGate can do this depending on the application and app server configuration – Slide 334: changed wording to say that deinstalling options from a PDB is “not supported” instead of often not working – Slide 343: Added PDB2 and PDB3, fade them during unplug of PDB1 – Slide 378: Added note that ADO is part of ACO – Slide 388: Changed title to indicate that Far Sync is part of Active Data Guard – Slide 431: Added the word “history” so that people don’t get confused between this stats retention and performance statistics retention in AWR – Slide master: updated Copyright date to 2015  10-FEB-2015 – Slides 60, 69, 70 (PSU Schedule), 75 (Wrong Results) – all updated/refreshed with current screen shots – Slide 76 moved to 60 (still hidden) and updated with screenshot from Note:1962125.1 – Slide 328 – Brackett was missing in the code example – Side 399 – added “_optimizer_apaptive_plans” – Slide 351 – Extended Slide Notes section with more explanation and the underscore to turn multiple lgwr-slaces off  26-FEB-2015 – Slide 14: Added – Slide 20: Removed (Link to MAA) – Slide 467: added Note Nr for Multitenant Replay https://support.oracle.com/epmos/faces/DocumentDisplay?id=1937920.1 – Slide 246/247 – Added dbms_file_transfer – Slide 164/165: ORAchk Slides updated – now 2 slides – Slide 36: Fixed type  22-MAR-2015 – Slide 4: Added (temporary, just for fun) – Slide 68: Updated screenshot so that the note about 12.1.0.2 being EE-only is there – Slide 160: Added reference for using standby with different versions, reformatted bullet points to include note titles  20-APR-2015 – Slide 373: Downgrade – removed outdated 11.1.0.7 MOS Note:443890.1 and 11.2.0.x MOS Note:883335.1 – added correct 12c note plus additional information – Slide 331 – Added Snapthot Clone syntax – Slide 514: Added White Paper Link: http://www.oracle.com/technetwork/database/securefilesmigrationpaper-130440.pdf – Slide 15/16: Updated Screenshots – Slide 376 – Updated Screen Shot – Slide 332: corrected typo: TRANSPORT_DATAFILES  7-MAY-2015 – Slides 12 – New slide: 11.2.0.4 vs 12.1.0-.2 – Slide 21 – New Slide: Winners use 12c, as Teaser Slide – Slide 25: Added "We'll wait for the 2nd release" – Slide 26: New slide: SAP certification – Slide 48/49 – consolidated into 1 slide and moved to SLIDE 85 – Slide 59 – New slide: Where is SE 12.1.0.2 – Slide 323 – New slide: Possible deployments of Oracle 12c (Stand alone, single tenant, multitenant) – Slide 338 – Changed to reflect note about creating a CDB with fewer options – Slide 355 – New hidden slide: AWR Lite Snapshots – Slide 362 – New slide: Changes for DBAs – to be continued – Slide 410 – New slide: Optimizer parameters – Slides 490/491 – New slides: The right testing tools  13-MAY-2015 – Slide 214 – Added FLASHBACK_SCN – Slide 215 – Added subtitle, updated with the new way of performing parallel index build, replaced the COMMIT_WAIT recommendation with transform parameter – Slide 216 – Added subtitle, changed line spacing to accommodate – Slide 217 – Added subtitle  27-May-2015 – Slide 329 – Changed "PDBs can have their own TEMP" into "PDBs must have" – (Doc ID 2004595.1) Upgrade, Migrate & Consolidate to Oracle Database 12c 616
  • 617. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Change Log 3 – Jun 18, 2015 - …  18-JUN-2015 – Slide 217: Heading typo corrected "Practices" to "Practices" – Slide 164 – DB Home can have higher PSU than GI Home – this is supported – Slide 167 – new screenshot for ORAchk 12.1.0.4 – Slide 534/535: Added for O2O Support by Oracle ACS (even though the slide does not mention O2O)  20-JUL-2015 – Slide 23 – NEW – Reference Quote RZF NRW – Slide 24 – NEW – Reference Article Mobiliar Insurance – Slide 28 – Added SAP In Memory information and screenshot – Slide 79 – Updated Screenshot "Avoid Poor Performance" – Slide 80 – Added 12c Note for SPARC platform – Slide 94 – added "physical/real" to the recommendation for CPU cores – added a reference to ASkTom – Slide 364: added "BEQ" – Slide 324: Updated Screenshot now saying "after 12.2" – Slide 92 – Added "in a new DB" for "Unified is enabled by default"  1-Sep-2015 – Slide 19 – Added: Hands on lab – Slide 21 – deleted: Data Pump OTN – Slide 61 – SE2 updated – Slide 65 – Download 12.1.0.2 from MOS refreshed with new patch id – Slide 71-73, 76-77, 79: updated screenshots – Slide 247/286: Deleted  15-Sep-2015 – Slide 80 – NEW – Patches for SPM – Slide 282 – NEW – OGG Readiness Scripts – Stopped noting down changes as I changed too many things … sorry! 617Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 618. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Credits go to …  Tom Kyte  Francois Lange  Magnus Fagertun (Oracle Norway)  Geoffroy Dessmond  Marco Patzwahl (MuniqSoft) for proofreading and so many tiny little findings I would have never catched!!  Mathias Zarick (Trivadis Delphi GmbH Austria) for the detailed feedback after our Vienna workshop  Dr. Peter Alteheld for mentioning so many tiny little changes in 12c not to be found under New Features!  Michel van de Wouw (TrustOn)  Alessandro Suardi, Luca Caimi (Oracle Italia)  Yasin Baskan (Oracle PM for Parallel Execution)  All the other people from Oracle giving feedbacks and contributing their slides, especially in the New Features section 618Upgrade, Migrate & Consolidate to Oracle Database 12c
  • 619. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Things to include in a future version  SRDC : Data Collection For Database Upgrade Slow Or Hung Issues (Doc ID 1918865.1)  SRDC : INVALID objects Before or After Upgrade (Doc ID 1918862.1)  SRDC - Data Collection for Upgrade issues (Doc ID 1672387.1)  SRDC - Data Collection for Downgrade Issues (Doc ID 1672880.1)  New command syntax: SELECT ename from container(scott.emp) WHERE IN CON_ID;  MOS Note: 1932762.1 Complete checklist for manual upgrade from 12.1.0.1 to 12.1.0.N (Full CDB Upgrade)  MOS Note: 1933391.1 Complete checklist for 12c R1 PDB upgrade (Upgrading single/multiple PDB)  MOS Note: 1932340.1 How to execute sql scripts in Multitenant environment (catcon.pl)  MOS Note: 1933011.1 Complete Checklist for DBUA Upgrade from 12.1.0.1 to 12.1.0.N  https://mosemp.us.oracle.com/epmos/faces/DocContentDisplay?id=1958998.1  MOS Note: 1576755.1 Step by Step Examples of Migrating non-CDBs and PDBs Using ASM for File Storage  Upgrade, Migrate & Consolidate to Oracle Database 12c 619
  • 620. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | 620Upgrade, Migrate & Consolidate to Oracle Database 12c