21935415430155112003_Upgrade_and_Migrate_to_12c
Transcript of 21935415430155112003_Upgrade_and_Migrate_to_12c
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
1/491
Upgrade,Upgrade,
Migrate &Migrate &ConsolidateConsolidate
Updated: 25-JUN-2013
oo rac e a a ase crac e a a ase c
Roy Swonger & Mike DietrichRoy Swonger & Mike DietrichDatabase Upgrade and UtilitiesDatabase Upgrade and Utilities
Oracle CorporationOracle Corporation
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
2/491
General Preparation Steps
Upgrade & Migration Cases
Fallback Strate ies
Introduction & Overview
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 2
Performance Management
Wrap Up
New Features in Oracle 12c
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
3/491
Database Upgrade Development Group
Roy SwongerSenior Director Software Dev.
&
Product Management
Carol TagliaferriSenior Manager Software Dev.
Roy SwongerSenior Director Software Dev.
&
Product Management
Carol TagliaferriSenior Manager Software Dev.
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 3
Cindy LimPrincipal Member Technical Staff
Joseph ErredePrincipal Member Technical Staff
Eric WittenbergPrincipal Software Engineer
Mike DietrichSenior Principal Technologist
Cindy LimPrincipal Member Technical Staff
Joseph ErredePrincipal Member Technical Staff
Eric WittenbergPrincipal Software Engineer
Mike DietrichSenior Principal Technologist
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
4/491
Some MAGIC Questions
Question? Answer
(
(
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 4
(
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
5/491
Database Upgrade
A database upgrade is called "Upgrade" because the data dictionarywill get upgraded to a later version
This will include Oracle components, options such as JAVAVM, SDO No data will be touched, changed or moved
Migration
Terminology
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 5
a a ase m gra on w appen w en e a a ase w move onew: Hardware, operating system platform, character set
Software Upgrade
In-Place:
The new software will be installed into an existing SW location Out-Of-Place
The new software will be installed into a new software location
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
6/491
2002
2004
2007
2010
2012
2015
2017
2020
2023
2025
Oracle 9.2Oracle 9.2(GA:(GA: Jul 2002)Jul 2002)
Oracle 10.1Oracle 10.1(GA:(GA: Jan 2004)Jan 2004)
Oracle 10.2Oracle 10.2(GA:(GA: Jul 2005)Jul 2005)
Lifetime Support Policy
JUL 2010JUL 2010JAN 2007JAN 2007
JAN 2012JAN 2012JAN 2009JAN 2009
JUL 2013JUL 2013JUL 2010JUL 2010
today
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 6
rac e .rac e .
(GA:(GA: Aug 2007)Aug 2007)
Oracle 11.2Oracle 11.2(GA:(GA: Sep 2009)Sep 2009)
OracleOracle 12.112.1(GA:(GA: Jun 2013)Jun 2013)
Sustaining SupportSustaining SupportExtended SupportExtended SupportWaived Extended SupportWaived Extended SupportPremier SupportPremier Support
AUG 2015AUG 2015AUG 2012AUG 2012
JAN 2018JAN 2018JAN 2015JAN 2015
today
JUNJUN 20212021JUNJUN 20182018
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
7/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
8/491
Database Patch Set Roadmap
Release Schedule of Current Database Releases Note.742060.1
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 8
Note.742060.1 contains also information about platform desupport and patching end dates
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
9/491
Upgrade Companion
Note:1462240.1 Upgrade Companion 12c (coming soon)
Note:785351.1 Upgrade Companion 11.2
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 9
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
10/491
Upgrade OTN Page
http://otn.oracle.com/goto/upgrade http://www.oracle.com/technetwork/database/upgrade/index.html
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 10
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
11/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
12/491
Upgrade Blog:blogs.oracle.com/UPGRADE
Scroll
down
to go
Scroll
down
to go
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 12
to theslidesto theslides
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
13/491
INTERNAL PPT DOWNLOAD ONLYhttp://database.us.oracle.com
clickclick
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 13
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
14/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
15/491
Upgrade and Migration Paths
Stay on same OS?N Y
UPGRADE/MIGRATIONexp/imp, expdp/impdp
Downtime >30min?N
SQL Apply &
CTAS, COPY, SQL Loader
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 15
Oracle Golden Gate
DBUA
Y
rans en an y
CLI
$> catctl.pl
Full Transportable Export/Import
Transportable Tablespaces
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
16/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
17/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
18/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
19/491
Preparation Checklist
In the SOURCE environment:
Clean Up
Components
Empty the recycle bin Check for INVALID objects in SYS/SYSTEM
Check for duplicate objects in SYS/SYSTEM Remove outdated parameters
Check for INVALID components
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 19
Performance
Optional
Remove obsolete components
Preserve performance statistics Check network performance
Perform Integrity checks
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
20/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
21/491
Clean Up: Invalid Objects
Always check for INVALID objects
SQL>
There should be no invalid objects owned by SYS orSYSTEM
select unique OBJECT_NAME, OBJECT_TYPE,OWNER from DBA_OBJECTS whereSTATUS='INVALID' order by OWNER;
select unique OBJECT_NAME, OBJECT_TYPE,OWNER from DBA_OBJECTS whereSTATUS='INVALID' order by OWNER;
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 21
ecomp e nva o ec s w ? rdbms admin utlrp.sqlbefore upgrade/migration
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
22/491
Clean Up: Duplicate Objects
Always check for DUPLICATE objects in SYS/SYSTEM
SQL> select OBJECT_NAME, OBJECT_TYPE fromDBA_OBJECTS where OBJECT_NAME||OBJECT_TYPEin (select OBJECT_NAME||OBJECT_TYPE fromDBA_OBJECTS where OWNER='SYS') andOWNER='SYSTEM' and OBJECT_NAME not in('AQ$_SCHEDULES_PRIMARY', 'AQ$_SCHEDULES','DBMS REPCAT AUTH');
select OBJECT_NAME, OBJECT_TYPE fromDBA_OBJECTS where OBJECT_NAME||OBJECT_TYPEin (select OBJECT_NAME||OBJECT_TYPE fromDBA_OBJECTS where OWNER='SYS') andOWNER='SYSTEM' and OBJECT_NAME not in('AQ$_SCHEDULES_PRIMARY', 'AQ$_SCHEDULES','DBMS REPCAT AUTH');
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 22
Clean up using MOS Note:1030426.6 How to Clean Up DuplicateObjects Owned by SYS and SYSTEM Schema
_ __ _
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
23/491
Clean Up: Parameters
Remove outdated parameters, underscores and eventsfrom your init.ora/spfile
Example:
_always_semi_join=off_unnest_subquery=falseoptimizer_features_enable=10.2.0.4event="10061 trace name context forever, level 10"
_always_semi_join=off_unnest_subquery=falseoptimizer_features_enable=10.2.0.4event="10061 trace name context forever, level 10"
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 23
Important:Also follow the application's upgrade instructions, such as EBSinteroperability notes these supersede any general removalrecommendation
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
24/491
Clean Up: ParametersReal World Crosscheck
Internal Oracle production database
Multimedia (ORDIM) component took very long to upgrade
_complex_view_merging = FALSE
_multi_join_key_table_lookup = FALSE_library_cache_advice = FALSE_index_join_enabled = FALSE_push_join_union_view = FALSE_push_join_predicate = FALSEalwa s semi oin = OFF
_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 = FALSEalwa s semi oin = OFF
Upgrade timeUpgrade timefor ORDIM:for ORDIM:
4949 minutesminutes
Remove allunderscoresand events
Upgrade timeUpgrade timefor ORDIM:for ORDIM:
77 minutesminutes
FactorFactor
x7x7
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 24
_ _ __pred_move_around = FALSE_unnest_subquery = FALSE_predicate_elimination_enabled = FALSE_eliminate_common_subexpr = FALSE_no_or_expansion = FALSEevent = '10195 trace name context forever, level 1'event = '10778 trace name context forever, level 1
_ _ __pred_move_around = FALSE_unnest_subquery = FALSE_predicate_elimination_enabled = FALSE_eliminate_common_subexpr = FALSE_no_or_expansion = FALSEevent = '10195 trace name context forever, level 1'event = '10778 trace name context forever, level 1
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
25/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
26/491
Components: Necessary Components
General recommendation:
Standardize the set of installed database components throughoutyour environment
XDB component is mandatory in Oracle Database 12cConsolidation:
All components must be installed in a CDB
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 26
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
27/491
Components: Removal
3 potential reasons to remove components:
A component does not exist anymore in Oracle Database 12c
EM Database Control Repository
Oracle UltraSearch Rules Manager and Expression Filter
OLAP AMD
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 27
Speed up the upgrade process
Fewer components mean faster database upgrades
A component is obsolete
Typical example: In 11g, EM DB Control Repository exists you
migrate to EM Cloud Control with its own dedicated repository Further information
Database Components Cleanup presentation on ourBlog http://apex.oracle.com/pls/apex/f?p=202202:2:::::P2_SUCHWORT:components
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
28/491
Performance: Preserve Statistics
Gather accurate performance statistics from production
Accurate means: Starting at least 1 month before the upgrade
This is of vital importance!!!
Use Automatic Workload Repository (AWR) Snapshots interval 30-60 minutes and retention >31 days
Extract AWR: SQL>
@?/rdbms/admin/awrextr.sql
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 28
SQL>
Please note: AWR usage requires a Diagnostic Pack license
Alternative: STATSPACK MOS Note:466350.1
Time important queries, reports, and batch jobs
See also:MOS Note:1477599.1 Best Practices Around Data Collection For Performance Issues
select * from table(DBMS_WORKLOAD_REPOSITORY.AWR_DIFF_REPORT_HTML(, 1, 101, 121, , 1, 201, 221));
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
29/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
30/491
Performance: Network Strategies
Move archived data in advance
If data files include lots of free space, export/import toavoid copying large numbers of empty blocks
Transfer protocols: Start parallel copy operations
Slow hardware:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 30
Install parallel network cards, replace outdated switches/repeaters Use features such as Data Guard or GoldenGate
Sneakernet:
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
31/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
32/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
33/491
Certification Check
Verify platform certification in My Oracle Support
Please see Note: 964664.1 and Note:431578.1 for explanations of Middleware andApplication Server product group assignments
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 33
S f
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
34/491
Software Download
How to access the software?
Get the latest patch set (if there's one available)!
http://support.oracle.com is the only source for patches and
patch sets
Patch sets cannot be downloaded from eDelivery or OTN
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 34
http://edelivery.oracle.com/
Software Delivery Cloud (formerly know as eDelivery) is therecommended source for downloading
If software is reissued, customers will be automatically informed via email Or, download from OTN:
http://otn.oracle.com/indexes/downloads/index.html
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
35/491
Installation of the new Software
Patch Set /Base Release
PSU/BP
Install newest PATCH SET(full install release since Oracle Database 11.2)
or
Install base release into a new Oracle home(if there's no patch set available yet)
Apply newest available Patch Set Update (PSU)
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 35
Patches
Apply recommended (bundled) patches (BP)
Apply Interim Patches for known issues
Upgrade Now: Start the database upgrade/migration!!!
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
36/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
37/491
P t h S t I t ll ti 11 2 0 3
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
38/491
Patch Set Installation 11.2.0.3
Patch set 11.2.0.3 is a full release
Therefore no need anymore to install 11.2.0.1 first!!!
Only way to do an in-place patch set installation
Backup your /dbs and /network/admin files ./runInstaller detachHome ORACLE_HOME=
$ ./runInstaller -detachHome ORACLE_HOME=/u01/orahomes/11.2.0
$ ./runInstaller -detachHome ORACLE_HOME=/u01/orahomes/11.2.0
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 38
Remove your 11.2.0.1 home contents
Install 11.2.0.3 into the previous 11.2.0.1 home
Restore /dbs and /network/admin files
Upgrade your database with DBUA or catupgrd.sql
Checking swap space: must be greater than 500 MB. Actual 10047 MB Passed
The inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/orabase'DetachHome' was successful.
Checking swap space: must be greater than 500 MB. Actual 10047 MB Passed
The inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/orabase'DetachHome' was successful.
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
39/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
40/491
Patching Notes Flow in MOS
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
41/491
Patching Notes Flow in MOS
MOS
Note:161818.1 Click on the releases
number
?Oracle 11.2.0
MOSNote:880782.1
Known Issuesand Alerts in
11.2.0.x
Click on"Availability andKnown Issues"for your patch
releases
MOSNote:1348336.1
Availability andKnown Issues
in 11.2.0.3
Check for:
RecommendedPatches
Alerts
Notable Fixes
IssuesIntroduced
MOSNote:756671.1
RecommendedDatabase Patches
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 41
?Oracle 12.1.0
MOSNote:xxxx
Known Issuesand Alerts in
12.1.0.x
Click on
"Availability andKnown Issues"for your patch
releases
MOSNote:xxxx
Availability andKnown Issues
in 12.1.0.y
Check for:
RecommendedPatches
Alerts
Notable Fixes
IssuesIntroduced
MOSNote:756671.1
RecommendedDatabase Patches
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
42/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
43/491
Upgrade Information / Alerts
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
44/491
Upgrade Information / Alerts
Recommended Patches for 11.2.0.3? Note:1348336.1 See also Recommended Database PatchesNote:756671.1
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 44
Recommended Patches: PSUs
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
45/491
Recommended Patches: PSUs
Install the latest PSU as well Note:854428.1: Introduction to Database Patch Set Updates
Note:1227443.1: Patch Set Updates Known Issues
Database PSUs include:
Fixes for critical issues that may affect a large number of customersand that are already proven in the field
Critical Patch Update fixes
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 45
Database PSUs do not include:
Changes that require re-certification
Fixes that require configuration changes
Typically 25-100 new bug fixes per PSU
Guaranteed to be RAC rolling installable
Released 4x per year - same schedule for PSUs and CPUs
16-APR-2013, 16-JUL-2013, 15-OCT-2013 & 14-JAN-2014
PSU check: opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU'
Upgrade Information / Alerts
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
46/491
Upgrade Information / Alerts
Alerts and new issues with 11.2.0.3? Note:1348336.1
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 46
Upgrade Information / Alerts
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
47/491
Upgrade Information / Alerts
Alerts and new issues with 11.2.0.3? Note:1348336.1
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 47
Important Optimizer Issues and Fixes
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
48/491
Important Optimizer Issues and Fixes
Things to consider before upgrade to Oracle Database 11.2.0.3 toavoid Poor Performance orWrong Results: MOS Note:1392633.1
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 48
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
49/491
Standby-First-Patching
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
50/491
y g
Oracle Data Guard Standby-First Patch Apply MOS Note:1265700.1 - Data Guard Standby-First Patch Apply
Apply a patch first on the physical standby site
Different software releases allowed between primary and standby
Role transitions allowed for rolling upgrades
Supported for:
Patch Set Update (PSU), Critical Patch Update (CPU) and PSE
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 50
Oracle Grid Infrastructure Patches or Software Updates
One-off patches
Oracle Exadata Database Machine bundled patches (BP), Quarter DatabasePatches, Storage Server Software patches (Cell), hardware/network changes
Operating System software changes that do not have any dependencies onOracle database software
Available beginning with Oracle Database 11.2.0.1
RDBMS COMPATIBLE must remain the same
ASM COMPATIBLE can be different
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
51/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
52/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
53/491
Parameter Recommendations
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
54/491
SEC_CASE_SENSITIVE_LOGON=TRUE Enables or disables password case sensitivity
Default TRUE since Oracle Database 11g
Deprecated since Oracle Database 12c Recommendation:
Age out passwords having PASSWORD_VERSIONS select USERNAME, PASSWORD_VERSIONS from DBA_USERS;
USERNAME PASSWORD_VERSIONS
---------- -----------------APP_USER 10G 11G 12C
HR_USER 10G 11G 12C
BOSS 10G
select USERNAME, PASSWORD_VERSIONS from DBA_USERS;
USERNAME PASSWORD_VERSIONS
---------- -----------------APP_USER 10G 11G 12C
HR_USER 10G 11G 12C
BOSS 10G
Parameter Recommendations
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
55/491
sqlnet.ora
SQLNET.ALLOWED_LOGON_VERSION_SERVER Determines minimum authentication protocol allowed by server
Default: 11
Values: 12a for Oracle Database 12c authentication protocols (strongest protection)
12 for the critical patch updates CPUOct2012 and later Oracle Database 11g
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 55
11 for Oracle Database 11g authentication protocols (default) 10 for Oracle Database 10g authentication protocols
8 for Oracle9i authentication protocol
If you connect with pre-11g clients to Oracle Database 12c you will
have to adjust the setting in yoursqlnet.ora file(s)
Parameter Recommendations
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
56/491
AUDIT_TRAIL Enables or disables database auditing
Attention:New Unified Auditing can be linked into the kernel
Unified Auditing is not enabled by default
Recommendation:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 56
Check if option is present : SQL> select VALUE from V$OPTION where
PARAMETER='Unified Auditing';
Switch Unified Auditing on
make -f ins_rdbms.mk uniaud_on ioracle ORACLE_HOME=$ORACLE_HOME
Set AUDIT_TRAIL=NONE
Note:Auditing table AUD$ will be moved into SYS schema if Label Security (OLS) is installed
Parameter Recommendations
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
57/491
DEFERRED_SEGMENT_CREATION Newly created tables will just allocate segments when a first row
gets inserted
Tablespace must be locally manages
COMPATIBLE 11.2.0
Default is TRUE since Oracle Database 11.2
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 57
Set it to FALSE except for cases where an application creates alarge number of empty tables with may never get used
Please note:
Small performance penalty when the first row is inserted, because the new
segment must be created at that time May cause contention issues using many Data Pump workers
See MOS Note 1216282.1
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
58/491
Parameter Recommendations
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
59/491
SESSION_CACHED_CURSORS Default: 50
Cursor caching mechanism was changed in Oracle 10.2.0.4
Recommendation: Explicitly adjust SESSION_CACHED_CURSORS as the default
value of 50 may be too low, especially when PL/SQL is used
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 59
Use MOS SCRIPT: 208857.1 to adjust parametersSESSION_CACHED_CURSORS and OPEN_CURSORS usage based
More information in MOS Note: 30804.1
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
60/491
Parameter Recommendation
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
61/491
MAX_STRING_SIZE Values: STANDARD, EXTENDED
Controls the maximum size of VARCHAR2, NVARCHAR2, and RAW
data types in SQL
STANDARD [DEFAULT]
Length limits prior to Oracle Database 12capply
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 61
RAW: 2000 bytes EXTENDED
New 32767 byte limit applies
Requires COMPATIBLE 12.0.0
Change from STANDARD EXTENDED is allowed, but no way back
Database in UPGRADE mode: @?/rdbms/admin/utl32k.sql
New Parameters in Oracle Database 12c
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
62/491
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
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 62
_ _
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
Deprecated and Obsolete Parameters
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
63/491
Deprecated in Oracle Database 12c: sec_case_sensitive_logon
Obsolete in Oracle Database 12c:
_app_ctx_vers _log_io_size
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 63
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
64/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
65/491
Case 1: Upgrade to Oracle Database 12c
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
66/491
Database upgrade including migration to a new server
Install andpatch
Oracle 12cPreupgradeChecks PrepareEnvironment
RestoreEntire
DatabaseUpgradeDatabase
PostUpgradeActions
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 66
Oracle 10.2.0.5RHEL4 32bit
1TB 1TB
24 hrs
Oracle 12.1.0.1OEL6 64bit
Upgrade to Oracle Database 12c
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
67/491
Oracle7.3.4
Oracle8.0.6
Oracle8.1.7.4
Oracle9.0.1.4
Oracle9.2.0.8
Oracle101.0.5
Oracle10.2.0.5
Oracle11.10.7
Oracle11.2.0.2
Oracle12.1.0.1
Oracle 7.3Oracle 7.3(GA:(GA: 1996)1996)
Oracle 8.0Oracle 8.0(GA:(GA: 19971997
Oracle 8.1Oracle 8.1(GA:(GA: 1998)1998)
Oracle 9.0Oracle 9.0(GA:(GA: 2001)2001)
Oracle 9.2Oracle 9.2
11.2.0.211.2.0.29.2.0.89.2.0.87.3.47.3.4
11.2.0.211.2.0.29.2.0.89.2.0.88.0.68.0.6
10.2.0.510.2.0.58.1.7.48.1.7.4
10.2.0.510.2.0.59.0.1.49.0.1.4
11.2.0.211.2.0.29.2.0.89.2.0.8
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 67
:: uu
Oracle 10.1Oracle 10.1(GA:(GA: Jan 2004)Jan 2004)
Oracle 10.2Oracle 10.2(GA:(GA: Jul 2005)Jul 2005)
Oracle 11.1Oracle 11.1(GA:(GA: Aug 2007)Aug 2007)
Oracle 11.2Oracle 11.2(GA:(GA: Sep 2009)Sep 2009)
OracleOracle 12.112.1(GA:(GA: Jun 2013)Jun 2013)
DIRECTDIRECT11.2.0.211.2.0.2
DIRECTDIRECT11.1.0.711.1.0.7
DIRECTDIRECT10.2.0.510.2.0.5
11.2.0.211.2.0.210.1.0.510.1.0.5
Please note: This graph will apply to database upgrades only!
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
68/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
69/491
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
70/491
Installation of Oracle Database 12c
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 70
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
71/491
Patch the new Oracle Database 12c home
Apply the newest availablePatch Set Update (PSU)
orApply recommended(bundled) patches (BP)
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 71
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Apply Interim Patchesfor known issues
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
72/491
New preupgrade scripts preupgrd.sql and utluppkg.sql supersede utlu112i.sql
Copy ?/rdbms/admin/preupgrd.sql and?/rdbms/admin/utluppkg.sql from your new Oracle 12c
home to your "old" source $ORACLE_HOME/rdbms/admin
Start preupgrd.sql in your source database
You ma start reu rd.s l in source environment's SQL*Plus
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 72
directly from the Oracle 12c home avoiding the copy operation
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TBCopy preupgrd.sqland utluppkg.sql
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
73/491
preupgrd.sql generates 1 log file and 2 scriptsSQL> @?/rdbms/admin/preupgrd.sql
generates its output in directory:$ORACLE_BASE/cfgtoollogs/V102/preupgrade
preupgrade.loghas detailed information about any findings, suggestions, warnings,
corrections and errors in your source database
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 73
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
preupgrade_fixups.sqlis the script you will need run in your source database it will
fix some issues or direct to fixes the DBA has to implement
postupgrade_fixups.sqlis meant to run shortly after the upgrade and will fix open issues and it will
contain directions for manual interaction as well (eg time zone change)
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
74/491
Run the new preupgrade script preupgrd.sql
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 74
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
75/491
If JAVAVM is not present or invalid or option offpreupgrd.sql won't create output files
Workaround:
$ cd $ORACLE_BASE/cfgtoollogs$ mkdir $ cd
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 75
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
$ mkdir preupgrade
Tracked as Bug14614756
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
76/491
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
77/491
Run preupgrade_fixups.sql:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 77
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
78/491
Manual actions required:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 78
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
79/491
Further manual actions may be recommended: Remove Enterprise Manager Database Control Repository:
$>SQL>
EM DB Control is superseded in 12c by EM Express
Therefore no repository is needed anymore
emctl stop dbconsole
@?/rdbms/admin/emremove.sqlemctl stop dbconsole
@?/rdbms/admin/emremove.sql
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 79
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
,removed during the catuppst.sql post-upgrade phase
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
80/491
Further manual actions may be recommended: Essential step if OLS (Label Security) and/or DV (Database Vault)
was already in the database prior to the upgrade
SQL>
Prepares the move of AUD$ table from SYSTEM to SYS
Processes the audit records to minimize downtime
@?/rdbms/admin/olspreupgrade.sql@?/rdbms/admin/olspreupgrade.sql
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 80
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
May require DV actions as well (see the documentation)
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
81/491
Edit new init.ora:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 81
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
82/491
Create a new password file:$> cd $ORACLE_HOME/dbs
$> orapwd file=orapwV102password=entries=15
format=12 force=yes
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 82
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
83/491
Enviroment:Set the 12.1 environment
Set ORACLE_BASE, ORACLE_HOME,ORACLE_SID, TNS_ADMIN, TMP and TMPDIR
Windows only:Create a new Service:oradim NEW -SID ORASID -SYSPWD passwrd
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 83
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
-STARTMODE a -PFILE n tf le
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
84/491
Listener configuration:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 84
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Be aware if clients
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
85/491
Either restore and recoveran RMAN Online Backup
Create a fresh TEMP tablespace
Or copy all relevant files to the new server
Data files, redo logs, control files.
RMAN> run { SET ARCHIVELOG DESTINATION TO '/tmp/tmprest';
RESTORE DATABASE;
RECOVER DATABASE; }
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 85
Network throughput is important!
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
86/491
Changing to the same OS platform, but from 32bit 64bit Change will be handled automatically as part of the upgrade
Special case: Keep the database version (not an upgrade!)
In the source environment:
startup upgrade;@?/rdbms/admin/utlirp.sql
shutdown immediate
In the source environment:
startup upgrade;@?/rdbms/admin/utlirp.sql
shutdown immediate
In the destination environment:
startup upgrade@?/rdbms/admin/utlrp.sql
In the destination environment:
startup upgrade@?/rdbms/admin/utlrp.sql
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 86
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
OLAP must be reloaded with xumuts.plb see MOS Note:352306.1
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
87/491
Start the database in STARTUP UPGRADE mode:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 87
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Wh t h d i d ?
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
88/491
What happens during STARTUP UPGRADE mode? Suppresses more than 20 expected error messages such as ORA-942
Snippet taken from the alert.log during STARTUP UPGRADE:
ALTER SYSTEM enable restricted session;
ALTER SYSTEM SET _system_trig_enabled=FALSE SCOPE=MEMORY;
Autotune of undo retention is turned off.ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=MEMORY;ALTER SYSTEM SET undo_retention=900 SCOPE=MEMORY;ALTER SYSTEM SET aq_tm_processes=0 SCOPE=MEMORY;ALTER SYSTEM SET enable_ddl_logging=FALSE SCOPE=MEMORY;
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 88
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Resource Manager sa e ur ng ata ase m grat on: p an'' not setALTER 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 asyncmultimaster replication found)AQ Processes can not start in restrict modeCompleted: ALTER DATABASE OPEN MIGRATE
N ll l d i t
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
89/491
New parallel upgrade script Default feature in Oracle Database
SERVER component upgrade scripts get executed in parallel,where possible
Other non-dependent components are run in parallel
Overall time to upgrade is reduced
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 89
Parallel upgrade is driven by aPERL script
ca c .pca c .p
script3.sqlscript3.sqlscript2.sqlscript2.sqlscript1.sqlscript1.sql
script4.sqlscript4.sql
script5.sqlscript5.sql
script6.sqlscript6.sql
script6.sqlscript6.sql
script7.sqlscript7.sql
script8.sqlscript8.sql
script9.sqlscript9.sql
script10.sqlscript10.sql
script11.sqlscript11.sql
ca c .p
script3.sqlscript2.sqlscript1.sql
script4.sql
script5.sql
script6.sql
script6.sql
script7.sql
script8.sql
script9.sql
script10.sql
script11.sql
Parallel Upgrade Customer Examples
T l S t J
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
90/491
Telco System, JapanTest upgrade from Oracle 9.2.0.8 to Oracle 11.2.0.3
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 90
0 500 1000 1500
ORACLE SERVERComponent Upgrade 669669
10461046 Parallel
36% faster36% faster
seconds
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
91/491
Upgrade duration to Oracle 12c mainly depends on:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
92/491
Upgrade duration to Oracle 12cmainly depends on: Number of installed components and database options
Number of objects in the database due to high amount of newdictionary tables, and restructuring of some base system tables
CPU Speed
Component HH:MM:SS
Oracle Server 00:16:17
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 92
JServer JAVA Virtual Machine 00:05:19
Oracle Workspace Manager 00:01:01
Oracle Enterprise Manager 00:10:13Oracle 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:19Oracle 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
Speed up the upgrade
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
93/491
Speed up the upgrade Create fresh dictionary statistics the night before the upgrade
SQL>
Create statistics for a specific XDB table if XDB is in use SQL>
exec DBMS_STATS.GATHER_DICTIONARY_STATS;
exec DBMS_STATS.GATHER_TABLE_STATS(ownname=>'XDB',
tabname=>'XDB$RESOURCE', estimate_percent=>NULL);
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 93
Preprocess missing entries in AUD$ if auditing was/is on
MOS Note: 1329590.1 offers a script to populate missing entries
If auditing was/is on by accident:
SQL>
If Oracle APEX is used consider to upgrade it separately
See MOS Note:1088970.1: Master Note for Oracle APEX Upgrades
truncate table SYS.AUD$ | SYSTEM.AUD$;
Start the upgrade on the Shell with catctl pl in parallel:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
94/491
Start the upgrade on the Shell with catctl.pl in parallel:
catctl.pl is the PERL driver
Will execute the upgrade scripts inparallel where possible
Executes catuppst.sql and
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 94
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
. -n ydetermines the parallel degree
Maximum of 8 parallel threads
Progress monitoring while catctl pl is running:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
95/491
Progress monitoring while catctl.pl is running:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 95
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
96/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
97/491
Recompilation with utlrp.sql
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
98/491
Recompilation with utlrp.sql SQL> @utlprp n can be called directly to customize CPU usage
Most efficient value for n is 2x number of CPU cores
Gathering fixed objects stats may speed up recompilation
SQL> exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 98
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Monitoring while utlrp.sql is running:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
99/491
Monitoring while utlrp.sql is running:1. Objects requiring compilation:
SELECT COUNT(*) FROM obj$
WHERE status IN (4, 5, 6);
2. Objects compiled already:
SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
3. Parallel jobs created by UTL_RECOMP:
SELECT job_name FROM dba_scheduler_jobs
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 99
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
WHERE job_name like 'UTL_RECOMP_SLAVE_%';
4. Parallel jobs still running:SELECT job_name FROM dba_scheduler_running_jobsWHERE job_name like 'UTL_RECOMP_SLAVE_%';
New status in DBA REGISTRY for the SERVER componenti f b f il ti
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
100/491
New status in _ for the componentin case of any error before recompilation:
COMP_ID COMP_NAME VERSION STATUS
-------- ----------------------------------- ----------- ----------
CATALOG Oracle Database Catalog Views 12.1.0.1.0 INVALID
CATPROC Oracle Database Packages and Types 12.1.0.1.0 INVALIDJAVAVM JServer JAVA Virtual Machine 12.1.0.1.0 VALIDCATJAVA Oracle Database Java Packages 12.1.0.1.0 VALID...
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 100
Check REGISTRY$ERROR for error details
After recompiliation the status remains the same compared toprevious releases
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
101/491
Run upgrade status check: utlu121s.sql:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
102/491
pg q
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 102
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
Run invalid objects check: utluiobj.sqlCh k l DBA INVALID OBJECTS
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
103/491
j j q Check also DBA_INVALID_OBJECTS
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 103
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
SQL> select OWNER, OBJECT_NAME,OBJECT_TYPE from DBA_INVALID_OBJECTS
order by 1,2;
Time zone adjustmentTi i h ld b d t d
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
104/491
j Time zone conversion should be done post upgrade
Required if datatype TIMESTAMP WITH TIME ZONE is used
Rule: TZDestination TZSource Time zone definitions in: $ORACLE_HOME/oracore/zoneinfo
Oracle Database Release Default Time Zone Vers.
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 104
10.2.0.3 10.2.0.5 DST V4
11.1.0.6 11.1.0.7 DST V411.2.0.1 DST V11
11.2.0.2 11.2.0.3 DST V14
12.1.0.1 DST V18
Most recent interim patch:See MOS Note:412160.1
DST V20
Time zone adjustment Why is this important?Real World Example from 2012:
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
105/491
j y p Real World Example from 2012:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 105
Why is the flight 1 hour shorter on Saturday?
Neither a faster jet nor better winds are the reason ... it's DST!!!
The USA moves to daylight savings time at 2:00 on 11-MAR-2012
Germany does not change until 25-MAR-2012
In 2013 it works better
Time zone adjustment:Use the scripts from MOS Note:1509653 1
Install and patchOracle 12c
PreupgradeChecks
PrepareEnvironment
Restore EntireDatabase
UpgradeDatabase
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
106/491
Use the scripts from MOS Note:1509653.1(or MOS Note:977512.1: Updating the RDBMS DST version in 11.2)
Database will
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 106
Oracle 10.2.0.5RHEL4 32bit
Oracle 12.1.0.1OEL6 64bit
1TB
e res ar e
Case 1: Summary
Database upgrade including migration to a new server
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
107/491
1TB 1TB
24 hrs
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 107
rac e . . .RHEL4 32bit
rac e . . .OEL6 64bit
Install andpatch
Oracle 12c
PreupgradeChecks
PrepareEnvironment
RestoreEntire
Database
UpgradeDatabase
PostUpgradeActions
Introduction & Overview
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
108/491
General Preparation Steps
Upgrade & Migration Cases
Fallback Strate ies
RAC Upgrade + ASMRAC Upgrade + ASM
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 108
Performance Management
Wrap Up
New Features in Oracle 12c
Case 2: Upgrade RAC and move to ASM
RAC Database migration to a new cluster including upgrade
Example Facts & Description
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
109/491
Example Facts & Description
1. Hardware migration to a new cluster
2. Database upgrade from Oracle 10.2.0.5 Linux 32bit to Oracle 11.2.0.3 Linux 64bit
3. Migration from OCFS into Oracle ASM
4. Maximum tolerated downtime: 4 hours
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 109
.
Oracle 10.2.0.5RHEL4 32bit
4 hrs
5TB 5TB
Oracle 11.2.0.3OEL5.8 64bit
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
110/491
Physical Standby Migration
Using a physical standby database to move to newhardware with minimal downtime
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
111/491
Fast and simple to setup and maintain
The entire process can be tested over and over again
With minimal impact on production
It would even work cross platform in some cases:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 111
or supporte com nat ons see: ote: .
HP-PA 11.23
HP-IA64 in Oracle 10.2.0.2 See: Note:395982.1
MS Windows Linux from Oracle 11g
Solaris x86 Linux x86 from Oracle 11g
But currently no cross-Endianness combinations possible
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
112/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
113/491
Always install (or later: upgrade) Oracle Clusterware first! Install it into a new Grid Infrastructure home
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
114/491
The grid infrastructure version must be greater than or equal to theversion of the resources it manages e.g. ASM, RDBMS
Parts of Grid Infrastructure home are owned by 'root Make sure to check Note:948456.1 for known issues
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 114
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
Oracle Home/Base ORACLE_BASE for GI should be different than the ORACLE_BASE
Grid Infrastructure Installation
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
115/491
for Oracle Database
Each installation user should have its own Oracle Base
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 115
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
116/491
RAC Check
RACcheck 2.2.2 has been released June 18, 2013 RACcheck is a RAC configuration audit tool for RAC, CRS, ASM,GI
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
117/491
Checks for:
OS kernel parameters, OS packages, OS settings etc
CRS/Grid Infrastructure, RDBMS, ASM, Database parameters
11.2.0.3 Upgrade Readiness assessment
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 117
RACcheck 11.2.0.3 Upgrade Readiness AssessmentMOS Note:1457357.1
RACcheck Users Guidehttps://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=1268927.1:RACCHECKUSERSGUIDE&clickstream=no
Available for download via MOS Note:1268927.1
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
118/491
Oracle Database 11.2 Clients connect to the database using SCANVIPs
Th SCAN i i t d ith th ti l t th th
SCAN: Planning, Prep and Prereqs
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
119/491
The SCAN is associated with the entire cluster rather than anindividual node
Resolves to up to 3 IP Addresses in DNS or GNS IP addresses returned in a round-robin manner
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c119
Provides load balancing and failover for client connections
Check this white paper for more details:
Oracle Real Application Clusters 11gRelease 2 Overview of SCAN (PDF)http://www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
120/491
Top Level Flow: Verify the hardware/software environment
I t ll th ft
Completing the Upgrade
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
121/491
Install the software
Configure the software
Finalize the upgrade
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 121
Top Level Flow: Verify the hardware/software environment
S Sh ll
Completing the Upgrade
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
122/491
Secure Shell
We recommend using OUI to set up ssh
Old ssh setup not always considered valid by 11.2 OUI, due to tighter restrictions, but OUI will correct it
OUI will validate ssh before allowing you to continue Watch out for stty commands or profile messages that may cause the automatic setup of ssh to fail
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 122
Cluster Verification Utility
Integrated into OUI but recommended to run before an install/upgrade
Has fixup scripts to correct certain failures (e.g. kernel parameters)
The most recent version is available from OTN
http://www.oracle.com/technetwork/products/clustering/overview/index.html
Install the software
Configure the software
Finalize the upgrade
Top Level Flow: Verify the hardware/software environment
I t ll th ft
Completing the Upgrade
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
123/491
Install the software
Oracle Universal Installer ./runInstaller
Should find existing Oracle Clusterware and suggest upgrade to GridInfrastructure
Must run installer as the previous version's software owner
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 123
If you need to collect debug tracing (request from support)
./runInstaller -debug Output is written to stdout by default
Use script command to capture the output
Configure the software
Finalize the upgrade
Additional information: Pinning nodes[from documentation]
In order to change the node pin behavior the appropriate command is the/crsctlpin/unpin css/command, to pin or unpin any specific node. Pinning a node means thatth i ti f d ith d b i fi d If d i t i d
Grid Infrastructure 11.2
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
124/491
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 apinned 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 afresh installation of Oracle Clusterware 11/g /release 2 (11.2), all servers you add to
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 124
.
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 Clusterware11/g/ release 2 (11.2) on that server.
Pinning a node is required for rolling upgrade to Oracle Clusterware 11.2 and will bedone automatically. We have seen cases where customer perform a manual upgradeand this would fail due to unpinned nodes.
Grid Infrastructure Installation 11.2
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
125/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 125
Grid Infrastructure Installation 11.2Node Selection and SSH
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
126/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 126
Grid Infrastructure Installation 11.2Grid Home
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
127/491
Make sure that BASE and SW locationare different subdirectories the slidehas it the wrong way!!!
Make sure that BASE and SW locationare different subdirectories the slidehas it the wrong way!!!
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 127
Grid Infrastructure Installation 11.2Setup ASM Roles
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
128/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 128
Grid Infrastructure Installation 11.2Cluster Verification
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
129/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 129
Grid Infrastructure Installation 11.2Cluster Verification
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
130/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 130
root> /tmp/CVU_11.2.0.1.0_grid/runfixup.sh
root> /tmp/CVU_11.2.0.1.0_grid/runfixup.sh
Grid Infrastructure Installation 11.2Cluster Verification
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
131/491
Response file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_grid/orarun.log
Setting Kernel Parameters...
Response file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_grid/orarun.log
Setting Kernel Parameters...
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 131
. - =
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500net.core.wmem_max = 262144
net.core.wmem_max = 1048576
uid=501(grid)gid=502(oinstall)groups=502(oinstall),
503(asmadmin),504(asmdba)
. - =
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500net.core.wmem_max = 262144
net.core.wmem_max = 1048576
uid=501(grid)gid=502(oinstall)groups=502(oinstall),
503(asmadmin),504(asmdba)
Grid Infrastructure Installation 11.2Cluster Verification
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
132/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 132
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
133/491
Grid Infrastructure Installation 12cManagement Repository
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
134/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 134
Clusterware - ASM - DB Compatibility
Note:337737.1
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
135/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 135
a) The Matrix is valid after the (rolling) upgrade has been completed.During the upgrade you may use an older ASM version.
b) The ASM version needs to be at least 10.1.0.3
Oracle Clusterware & ASM Upgrade
Documentation:
Oracle Clusterware Administration and Deployment Guide 11ghttp://download.oracle.com/docs/cd/E11882_01/rac.112/e16794/toc.htm
Grid Infrastructure Upgrade Known Issues:
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
136/491
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
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 136
RAC Best Practices Starter Kit:
Note:810394.1: RAC Assurance Support Team: RAC and Oracle Clusterware Starter
Kit and Best Practices (Generic)
Also see platform-specific notes linked from the generic starter kit
Upgrading an ASM instance with OUI within Oracle Clusterwareupgrade: OUI or asmca upgrade
http://docs.oracle.com/cd/E11882_01/server.112/e16102/asminst.htm#CHDGFHDC
Oracle Grid Infrastructure Patch Sets
Oracle Grid Infrastructure Patch Set 11.2.0.3:
Patch set is a bit misleading: its a full release!
Installation is out-of-place only into a separate home
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
137/491
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)
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 137
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
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
138/491
Database software installation:
Oracle Database 11.2.0.3
Oracle Database 10.2.0.1 plus patch set 10.2.0.5
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
139/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 139
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
Oracle 10.2.0.5PHYSICAL STANDBYPHYSICAL STANDBY
Download preupgrade check script utlu112i.sql
See MOS Note:884522.1
Run utlu112i.sql in the source database
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
140/491
Without script execution the upgrade won't proceed
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 140
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
Copy utlu112i.sqlor download it 884522.1
Note 452924.1 - How to Prepare Storage for ASM
Raw disk
Logical unit numbers (LUNs)
R l i l l (LVM)
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
141/491
Raw logical volumes (LVM)
LVM configurations are not recommended NFS files
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 141
Suitable for testing only
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
Configuring ASM with ASMCA
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
142/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 142
Configuring ASM with ASMCA
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
143/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 143
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
144/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
145/491
Case 2: Upgrade RAC and move to ASM
RAC Database migration to a new cluster including upgrade
Install and patch:GI and DB Preupgrade
PrepareEnvironment
RestoreOnline
Activateand
PostUpgrade
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
146/491
11.2.0.3DB 10.2.0.5
gChecks
Environment
and ASMBackup forStandby
andUpgrade
UpgradeActions
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 146
Oracle 10.2.0.5RHEL4 32bit
4 hrs
5TB
Oracle 11.2.0.3OEL5.8 64bit
Oracle 10.2.0.5PHYSICAL STANDBYPHYSICAL STANDBY
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
147/491
Restore Backup into ASM
Make sure the backup is available on DESTINATION rman target /
connected to target database (not started)
RMAN> startup nomount
RMAN> restore spfile to pfile "$ORACLE HOME/dbs/initSTY ora"
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
148/491
RMAN> restore spfile to pfile "$ORACLE_HOME/dbs/initSTY.ora"
from "$ORACLE_BKD/my.spfile";
Modify init.ora:
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 148
. _crea e_ e_ es = +
*.db_recovery_file_dest=+FRA1
Connect again with RMAN to restore the backup into ASM rman target sys/password@source auxiliary /
RMAN> startup auxiliary nomount;
RMAN> duplicate target database for standby dorecover;
Move OCR and Voting Disk from ASM to raw
Rename controlfiles and switch on log transport and recovery
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
149/491
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
150/491
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:
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
151/491
If you upgrade without moving to new hardware you ll execute:
$> srvctl upgrade database d -o
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 151
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
5TB
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
Install and patch:GI and DB 11.2.0.3
DB 10.2.0.5Preupgrade Checks
Prepare Environmentand ASM
Restore OnlineBackup for Standby
Activate andUpgrade
Post UpgradeActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
152/491
$> ocrconfig -add +data
$> ocrconfig -delete /dev/raw/raw1
$> crsctl replace votedisk +VOTING
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 152
e CLUSTER_DATABASE o TRUE an s ar e ns ances on a no es
Oracle 10.2.0.5RHEL4 32bit
5TB
Oracle 11.2.0.3OEL5.8 64bit
5TB
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
N t 265633 1 ASM T h i l B t P ti
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
153/491
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
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 153
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-bitOracle?
Case 2: Summary
RAC Database migration to a new cluster including upgrade
5TB 5TB
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
154/491
Oracle 10.2.0.5
4 hrs
Oracle 11.2.0.3
Oracle 10.2.0.5
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 154
RHEL4 32bit OEL5.8 64bit
Install and patch:GI and DB11.2.0.3
DB 10.2.0.5
PreupgradeChecks
PrepareEnvironment
and ASM
RestoreOnline
Backup forStandby
Activateand
Upgrade
PostUpgradeActions
PHYSICAL STANDBYPHYSICAL STANDBY
Real World Checkpoint
The Customer:Interhyp AG
HQ in Munich, Germany
Bank for residential and
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
155/491
development financing Offering banking service to other German key
Constraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 155
100% subsidiary of Dutch ING Bank
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Project scope:
Upgrade 6x 2-node-RAC systems all onOracle 10.1.0.5 on RH Linux 32bit
Target:
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
156/491
Oracle RAC 11.2.0.2 with ASM RH Linux 64bit
Constraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 156
ar ware exc ange or ey sys ems 4-node cluster
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Constraints:
Downtime window limited to 4 hrs per database
Migrations to be done serially, not in parallel
Not the fastest network connection
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
157/491
LOBs in the source database First tests with Data Pump on NETWORK_LINK
Constraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 157
n n o e own me requ remen s
Upgrade
Success?
Remarks
repara on
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
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
158/491
databaseConstraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 158
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Build up a physical standby database on the
new cluster Oracle 10.1.0.5 Oracle 10.1.0.5 within 11.2 ASM
Note: This is officially not supported but will work
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
159/491
Goal: Activate and upgrade the standby databaseAdvantage: This can be tested many times
Constraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 159
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Upgrade
Activate standby and start in STARTUP UPGRADE
Invalidate and compile all packages/code (32bit 64bit!)
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
160/491
Register database to Clusterware and moveOCR/Voting to ASMConstraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 160
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Live? And alive?
Yes!!! Go Live: 27-NOV-2010
Total downtime: ~2 hours
Database upgrade time:
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
161/491
24 minutes + 5 minutes recompilation Very robust using the entire Oracle software stack
Constraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 161
Upgrade
Success?
Remarks
repara on
Real World Checkpoint
Well ... the optimizer ...
We found some optimizer issues
Reports were affected
Remedy: Hints, rewrite and patches plus SQL
Customer
Project
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
162/491
ProfilesConstraints
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 162
Upgrade
Success?
Remarks
repara on
General Preparation Steps
Upgrade & Migration Cases
Introduction & Overview
Endianness Migration
Endianness Migration
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
163/491
pg g
Fallback Strate ies
gg
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 163
Performance Management
Wrap Up
New Features in Oracle 12c
Case 3: Cross Endianness Migration
Migration of a single instance database to Exadata
Example Facts & Description
1. Hardware migration to an Exadata Database Machine
2. Cross Endianness database migration from Oracle 9.2.0.8 to Oracle 11.2.0.3
3 Maximum tolerated downtime: 24 hours
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
164/491
3. Maximum tolerated downtime: 24 hours
4. Database size: 8TB
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 164
OracleOracle 9.2.0.89.2.0.8HPHP--UXUX
Oracle 11.2.0.3Oracle 11.2.0.3OEL5.8 64bitOEL5.8 64bit
8TB8TB
24 hrs
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
165/491
Case 3: Cross Endianness Migration
Options since Oracle 10g: Data Pump expdp and impdp
Usally the first option as it is easy and powerful
Cross platform Transportable Tablespaces (TTS)
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
166/491
More complicated, more manual steps than Data Pump
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 166
Oracle 9.2.0.8Oracle 9.2.0.8HPHP--UXUX
24 hrs
8TB
Oracle 11.2.0.3Oracle 11.2.0.3OEL5.8 64bitOEL5.8 64bit
8TB
Oracle 11.2.0.3Oracle 11.2.0.3HPHP--UXUX
8TB
SWING
Case 3: Cross Endianness Migration
Migration of a single instance database to Exadata
Prepare anew databaseon EXADATA
Restore onlinebackup toSWING
Upgradedatabase on
SWING
Full databaseimport via
NETWORK_LINK
Post MigrationActions
-
7/22/2019 21935415430155112003_Upgrade_and_Migrate_to_12c
167/491
Copyright 2013, Oracle and/or its affiliates. All rights reserved. Upgrade, Migrate and Consolidate to Oracle Database 12c 167
Oracle 9.2.0.8Oracle 9.2.0.8HPHP--UXUX
24 hrs
8TB
Oracle 11.2.0.3Oracle 11.2.0.3OEL5.8 64bitOEL5.8 64bit
8TB
Oracle 11.2.0.3Oracle 11.2.0.3HPHP--UXUX
8TB
SWING
Data Pump Overview
The new faster export-import
Available starting with Oracle 10.1
Powerful concept:
Restartable via job interface
-
7/22/2019 2193541