2023 06 12 Aoug Hol
2023 06 12 Aoug Hol
2023 06 12 Aoug Hol
dohdatabase
@dohdatabase
https://dohdatabase.com
MikeDietrich
@MikeDietrichDE
https://MikeDietrichDE.com
https://tinyurl.com/aoug2023hol
6 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
7 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
8 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
• If you don't have an Oracle SSO User yet, please create one: https://tinyurl.com/OracleSSO
9 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
Click on "Start Workshop Now", on the CONSENT checkbox, and then "Submit Reservation"
10 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
This will take you to "My Reservations" – now we have 11 mins to explain the exercises
11 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Introduction into the Lab:
Hitchhikers Guide to Oracle Database 19c
Upgrade to Oracle Database 19c and ensure performance stability
12 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Overview
Convert to PDB
UPGR CDB2
AutoUpgrade
Unplug-plug
upgrade PDB3 CDB2
AutoUpgrade
13 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade
Upgrade to Oracle Database 19c and ensure performance stability
14 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lifetime Support Policy
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
MARKET
Oracle 11.2 WAIVED EXTENDED EXTENDED DRIVEN
MARKET
Oracle 12.1 EXTENDED DRIVEN
Oracle 18
(12.2.0.2)
Oracle 19 EXTENDED
(12.2.0.3)
Oracle 21
Premier Support Waived Extended Support Paid Extended Support Market Driven Support Limited Error Correction
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
MARKET
11.2.0.4 DRIVEN
12.1.0.2 MDS
12.2.0.1
18c
Oracle 19 EXTENDED
(12.2.0.3)
Oracle 21
Innovation
Innovation
17 Copyright © 2023, Oracle and/or its affiliates Long Term Support Extended
Move production databases from one
Long Term Support release to the next
1 2 3
Install Oracle Home Download and deploy the Collect performance
including RU and MRP most recent AutoUpgrade information from current
source and test thoroughly
MOS Note: 2118136.2 MOS Note: 2485457.1
MOS Note: 555.1
MOS Note: 2781612.2
11.2.0.4
12.2.0.1
12.1.0.2
18c
12.2.0.1
18c
19c
ONE BUTTON APPROACH 19c
21c
1. 2. 3.
CONFIG FILE ANALYZE UPGRADE
Optionally,
convert to PDB
AutoUpgrade Overview
27 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade Overview
28 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade Overview
29 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade Overview
One command
$ java -jar autoupgrade.jar -config cdb1.cfg -mode deploy
30 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade Overview
31 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
AutoUpgrade
Essentials
Download
Configure
Analyze
Check
Upgrade
Download Upgrade
Configure $ java -jar autoupgrade.jar -config CDB1.cfg -mode deploy
Analyze
Check
Upgrade
Download Monitor
Configure
upg> lsj
Analyze
+----+-------+---------+---------+-------+--------------+--------+---------------+
Check |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+---------------+
Upgrade | 101| CDB1|PREFIXUPS|EXECUTING|RUNNING|20/11/24 13:38|13:39:26|Remaining 12/13|
+----+-------+---------+---------+-------+--------------+--------+---------------+
Analyze Progress
-----------------------------------
Check Start time: 20/11/24 13:38
Elapsed (min): 13
Upgrade Last update: 2020-11-24T13:48:52.139
Stage: DBUPGRADE
Operation: EXECUTING
Status: RUNNING
Stage summary:
SETUP <1 min
GRP <1 min
PREUPGRADE <1 min
PRECHECKS <1 min
PREFIXUPS 8 min
DRAIN <1 min
DBUPGRADE 3 min (IN PROGRESS)
Error Details:
None
Download Success
Configure upg> Job 101 completed
------------------- Final Summary --------------------
Analyze Number of databases [ 1 ]
---- Drop GRP at your convenience once you consider it is no longer needed ----
Drop GRP from CDB1: drop restore point AUTOUPGRADE_9212_CDB1122010
And it includes:
• Recompilation (utlrp.sql)
• Time zone file upgrade
• Postupgrade fixups
• ... and so much more
Download
Configure
Analyze
Check
Upgrade
Watch on YouTube
48 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Exercises
4. Upgrade: AutoUpgrade
49 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Let's get started
Upgrade to Oracle Database 19c and ensure performance stability
50 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
51 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
52 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
53 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
54 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Lab Provisioning
You may want to close SQL Developer – then you have more space to work
55 Oracle CloudWorld Copyright © 2022, Oracle and/or its affiliates | Confidential: Restricted
Performance Stability Prescription
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
SQL Tuning Set | Definition
SQL statement
Context
Statistics
Plans
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
COMPARE
Upgrade
Plans
SPA
Test execution
Pro tip: For migrations,
Before upgrade import STS into target database
After upgrade
SPA | Regressed Report
From production
workload From test
execution
SPA | Regressed Report
SPA | Regressed Report
SPA | Regressed Report
SPA | Continuous Improvement
19c
COMPARE
Implement COMPARE
change SPA
Test execution
SPA | Regressed Report
Performance Stability Prescription
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
Types of findings:
5. Transparent to application
• Does not require application changes
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
Next execution
Repeatable SQL
Filter
Something
on: changed
• Schema
New statistics OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=TRUE
OPTIMIZER_USE_SQL_PLAN_BASELINES=TRUE
• SQL
New text
parameters
No plans A
Plan B Plan history
• Module
Upgrade
in baseline Filter - Dedicated part of SQL plan baseline
• Action
Plan A is used
Result:
Performance better
not better
Plan History
Plan A Plan C Plan D Plan B Plan D
Accepted Accepted Accepted Not accepted Not accepted
SQL> DECLARE
cnt number;
BEGIN
cnt := DBMS_SPM.LOAD_PLANS_FROM_SQLSET('UPG_STS_1');
END;
/
Plan History
Plan A Plan C Plan B
Accepted Accepted Not accepted
Automatically
accepted
77 Copyright © 2022, Oracle and/or its affiliates
SPM | Use Case
Load into
Test Plan baseline
19c Plans fromSQL plan baseline
tuning
Automatically
accepted
1. 3. 5.
Collect Analyze Manage
2. 4. 6.
Compare Tune Test
• 300+ videos
• No marketing
• No buzzword
• All tech
Link