Академический Документы
Профессиональный Документы
Культура Документы
Table created. ops$tkyte%ORA11GR2> create index t_idx on t(str,object_name); Index created. ops$tkyte%ORA11GR2> begin 2 3 4 5 6 7 end; / dbms_stats.gather_table_stats ( user, 'T', method_opt => 'for all indexed columns size 254', estimate_percent=>100 );
| T_IDX |
--------------------------------------------------------------------------------------
4
5 6 7 end; /
---------------------------------------------------------------------------
The Law of unintended consequences holds that almost all human actions have at least one unintended consequence. Unintended consequences are a common phenomenon, due to the complexity of the world and human over-confidence.
Never Stopping
Planning Ahead
10
11
11
13
13
Repeated plans will be added to the SQL Plan Baseline during this phase
Plan History
GB
Parse
Plan Baseline
HJ GB HJ HJ HJ
14
SQL Plan Management Phase 2 - Selection New Plans are generated (because something changed) But are not trusted
OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES=FALSE New plan will be added to the Plan History but it won't be used unless and until it has been verified
Plan History
GB GB GB NL NL NL NL
Hard Parse
NL
Plan Baseline
GB HJ HJ GB HJ HJ GB HJ HJ
NL GB NL NL
15
SQL Plan Management Phase 3 Evolution Plans are verified by testing the performance of the new plan in the background
Automagically or Manually
Inefficient plan will be kept in the Plan History GB
NL NL
Plan History
Plan Baseline
GB NL GB GB
HJ
NL
NL
HJ
DBA
NL
Automatic Job
16
Upgrade Scenario Your 9i application is already in 11g for whatever reason Youd like to have query plan stability
Coupled with the opportunity to use better plans do not want to be frozen
17
Repeatable plans will be added to the Plan Baseline upon 2nd execution
Plan History
GB
STS
Now: Different plans created with OFE=11 will be added to the Plan History for later verification
Plan Baseline
GB NL NL GB HJ HJ GB
NL NL
NL NL
18
Upgrade Scenario Your application is in 9i Youd like to have query plan stability
Coupled with the opportunity to use better plans do not want to be frozen
You will be changing platforms during the upgrade (not doing a direct upgrade of the database) The steps would be.
19
STS
Capture query outlines on the production system
SS
3
DBMS_SPM.MIGRATE_STORED_OUTLINE
Plan History
Plan Baseline
GB NL NL GB HJ HJ GB NL NL
20
Upgrade Scenario Same Scenario but your application is in 10g Youd like to have query plan stability
Coupled with the opportunity to use better plans do not want to be frozen
You will be changing platforms during the upgrade (not doing a direct upgrade of the database) The steps would be.
21
Staging
exp imp expdp impdp DB-Link ...
STS
3
10.2 plans will become the SQL Plan Baseline
Plan History
GB
Plan Baseline
GB NL NL GB HJ HJ GB NL NL
NL NL
22
Upgrade Scenario You would like to deploy from development to production.. You would like to deploy at a customer site And you want to start with a stable set of plans
Using better plans only after they have been verified
23
@Vendor
DBMS_SPM.CREATE_STGTAB_BASELINE Staging exp imp expdp impdp Table Table
@Customer
Staging
3
DBMS_SPM.PACK_STGTAB_BASELINE
DBMS_SPM.UNPACK_STGTAB_BASELINE
Plan Baseline
GB
Plan Baseline
GB
NL NL NL GB HJ HJ GB NL NL
GB
HJ
GB NL HJ
NL NL
24
Test to Scale
25
25
26
Supported Changes
Changes Unsupported (there are other tools for that)
Client Client
Client
Middle Tier
Changes Supported
Database Upgrades, Patches Schema, Parameters RAC nodes, Interconnect OS Platforms, OS Upgrades
Storage
CPU, Memory
Storage Etc.
27
Production System
Client
File System
Middle Tier
File 1
Independent of client protocol Can capture on 9i, 10g, and 11g and replay on 11g Capture load for interesting time period, e.g., peak workload, month-end processing, etc.
Storage
File 2
File n
28
Test System
File 1
Processing transforms captured data into replayable format Once processed, workload can be replayed many times For RAC copy all capture files to single location for processing or use shared file system
File n
File n
Capture Files
29
Test System
Replay Clients
File 1
File 2
File n
Metadata
Replay Files
30
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
31
Test
Oracle DB
Storage
Make Changes / Tuning Regressions * No middle & application tier setup required
32
Test
Make Change
(4) (5)
Transport STS
Compare Perf.
(6)
Reiterate
No
Done?
Yes
(7)
Production Change / (7) Tuning Deployment
Tuned System
33
From:
Manual SQL capture, High overhead Non-production SQL context
To:
Automated SQL capture, Negligible overhead Production SQL context Complete SQL workload Automated analysis in minutes Automatic regression tuning Low risk, Low cost
34
Database Replay
Replays real database workload on test system, helps assess impact of change on workload throughput Captures workloads and replays it with production characteristics including concurrency, synchronization & dependencies Comprehensive testing of all subsystems of the database server using real production workload
SQL Concurrency Speed up/down
How it works?
When to use?
35
More information
36
37
37
Flashback Query
Flashback Tables
Flashback Database
38
Restore Points
Restore point specifies a jump label Named Restore Point
Similar to a bookmark "Can be" - but no guarantee Will be recorded to the control file
SQL> CREATE RESTORE POINT rpt; SQL> FLASHBACK DATABASE TO RESTORE POINT rpt;
SQL> CREATE RESTORE POINT grpt GUARANTEE FLASHBACK DATABASE; SQL> FLASHBACK DATABASE TO RESTORE POINT grpt;
39
Never Stopping
40
40
Clients
Redo
A B
Logs Queue
Version X 1
Version X 2
X+1
Redo Upgrade
A B A
Redo
B
41
Code changes are installed in the privacy of a new edition Data changes are made safely by writing only to new columns or new tables not seen by the old edition An editioning view exposes a different projection of a table into each edition to allow each to see just its own columns A crossedition trigger propagates data changes made by the old edition into the new editions columns, or (in hot-rollover) vice-versa
42
Object_3
Object_2 Object_1
Pre-upgrade edition
43
Object_3
Object_2 Object_1
Object_3
Object_2 Object_1
is child of
(inherited)
(inherited)
(inherited)
Pre-upgrade edition
Post-upgrade edition
44
Object_3
Object_2 Object_1
Object_3*
Object_2 Object_1
is child of
(actual)
(inherited)
(inherited)
Pre-upgrade edition
Post-upgrade edition
45
46
46
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle.
47
MOS-EM: Unified View, Integrated Information Between My Oracle Support and Enterprise Manager
My Oracle Support
Knowledge Management Oracle Problem/SR Management Configuration Management
Enterprise Manager
Customer
Operating Systems
Databases Middleware
Applications
48
48
Benefits
Reduced time to create, manage and execute Upgrade plan Streamlined process to request merge patches Greater Reliability due to Software Currency Latest SW, Patch, and Certification information Accuracy of recommendations based on config data (not manual) Lower Risk Automated analysis for missing patches and conflict checking
49
49
Capabilities
Upgrade path SW
recommendations w/
Value
Reduced Time in research,
analysis and management of Upgrade Plan
50
50
Sub-Phase
Upgrade Plan
Upgrade Testing
Rehearsal
Production Upgrade
Provisioning
Monitoring
My Oracle Support EM Grid Control Integrated solution can be leveraged throughout full lifecycle
*Will be integrated in upcoming release
51
51
52
Upgrade is easier! The upgrade to Oracle Database 11g is much easier than any upgrades to earlier Oracle releases Size of Upgrade guides:
8.1.7- 512 pages 9.0.1- 484 pages 111 steps for an RDBMS with 9 components 9.2.0- 344 pages 10.1.0 - 170 pages 10.2.0 - 140 pages 11.1.0 - 186 pages 11.2.0 -178 pages
53
53
Documentation
54
9.2.0.8
10.1.0.5 10.2.0.2
11.2
11.1.0.6
56