Professional Documents
Culture Documents
Roy Swonger
Vice President Development
Mike Dietrich
Senior Director Product Management
1
Copyright © 2022, Oracle and/or its affiliates
ROY SWONGER
Vice President
Database Upgrade, Utilities & Patching
royfswonger
@royfswonger
mikedietrich
@mikedietrichde
https://mikedietrichde.com
11.2.0.4 1. 2. 3.
12.2.0.1
12.1.0.2
18c
12.2.0.1
18c ONE BUTTON APPROACH 19c
21c
19c But giving you all the control you want
CONFIG FILE ANALYZE UPGRADE
Optionally,
convert to PDB
Requirement: SAP Application & Database tiers must be in same cloud environment
• No hybrid deployment
1. RMAN backup/restore
• Or same method by using BR*Tools brbackup command
• Requires compatible source/target platform
Primary
database
Standby
database
Hybrid Data Guard to Exadata Cloud Services
Production Database on Premises and Disaster Recovery
with Oracle Cloud Infrastructure Exadata Cloud Service
MIGRATION
methods
PLATFORM_NAME ENDIAN_FORMAT
____________________________________ ________________
AIX-Based Systems (64-bit) Big
Apple Mac OS Big
HP-UX (64-bit) Big
HP-UX IA (64-bit) Big
IBM Power Based Linux Big
IBM zSeries Based Linux Big
Linux OS (S64) Big
Solaris[tm] OE (32-bit) Big
Solaris[tm] OE (64-bit) Big
Endianness Migration | Transport
•
Transport
Methods
12.1.0.2
Final
Level
Level10incremental
imagefile backup
backup
Tablespaces
Convert
Different data file
Set read-only on restore
endian format
Data Pump
Full Transportable
Export/Import
Source Target
Primary
Tablespace plug-in
via redo apply
Tablespaces Target
Restore Standby
Transport
Checklist
Recommendation
• Keep production CDB on AL32UTF8
• Provision temporary CDB with desired character set
• Create new empty PDB in temporary CDB
• Clone custom PDB to production CDB
• Requires
• Enterprise Edition (on-prem)
• Enterprise Edition Extreme Performance (DBCS)
• Exadata
•
•
•
•
•
•
•
•
Mitigate risks
Performance Stability
In
95%
of all cases, "upgrade problem" in reality is a performance
issue
after upgrade. Or not database related.
TESTING!
Only proper testing can mitigate the risk and
Restrictions:
• As many databases as you want
• Non-CDB are supported only for 12.1.0.2 and 19c
• Supports RAC
• Max. storage up to 598 TB
• Depend on Exadata version and configuration
• Additional storage can be allocated via additional storage servers
To create non-CDB
• It is not possible to create a non-CDB via the console - use dbaasapi
• Creating non-CDB databases on the Service in OCI (Doc ID 2528257.1)
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
AWR
Cursor Cache
SQL Tuning Set
Staging Tables
SQL Plan Management
SQL Tuning Advisor
SQL Performance Analyzer
Database Capture and Replay
Due to completely different specs and load scenarios, the result may be misleading or not
useful
On-Prem Database
Test Database
awrextr.sql awrload.sql
Instances in this Workload Repository schema
awrddrpi.sql ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ ---------- --------- ---------- ------
72245725 1 UPGR UPGR hol.localdom
* 753780962 1 CDB2 CDB2 hol.localdom
Upgrade /
Plans
Migrate SPA
Test execution
Before upgrade After upgrade
From production
workload From test
execution
Implement
change SPA
Test execution
On-Prem Database
Test Database
Test
system
Workload
capture
Replay
analysis Preprocess
Capture files
Replay files
On-Prem Database
Test Database
SQL Tuning Advisor | Findings
Types of findings:
5. Transparent to application
• Does not require application changes
• OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE
OPTIMIZER_USE_SQL_PLAN_BASELINES=TRUE
•
No plans A
Plan B Plan history
•
in baseline Filter - Dedicated part of SQL plan baseline
•
Plan A is used
SQL Tuning set Plan C
SQL> DECLARE
cnt number;
BEGIN
cnt := DBMS_SPM.LOAD_PLANS_FROM_SQLSET('UPG_STS_1');
END;
/
Automatically
accepted
SPM | What if ... literals
Upgrade
Analyze
Import workload
Capture workload
Upgrade Tune
11.2.0.4
Plan baseline
Import plansplans
Export
Automatically
accepted
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
Parameter optimizer_adaptive_plans
• Default: TRUE
• Adjust join methods, bitmap pruning and parallel distribution methods during runtime after
parsing
Parameter optimizer_adaptive_statistics
• Default: FALSE
• Create dynamic statistics, SQL Plan Directives and do automatic reoptimization
Recommendation
Parameter _sql_plan_directive_mgmt_control
Recommendation
Parameter _cursor_obsolete_threshold
Recommendation
Parameter deferred_segment_creation
Recommendation
sourceplatid=2
dbid=4173218531
retrycount=2
Custom TTS
Customized
Restore/Recove Transportable
r
Tablespaces Scripts
Inc Backup Transport
Rebuild Meta
https://MikeDietrichDE.com/videos
https://MikeDietrichDE.com
https://DOHdatabase.com
https://www.dbarj.com.br/en
THANK
YOU
Webinars:
https://MikeDietrichDE.com/videos
YouTube channel:
OracleDatabaseUpgradesandMigrations
THANK
YOU