Sie sind auf Seite 1von 28

<Insert Picture Here>

Oracle Database 11g – What Does This Mean?


Thomas Kyte
http://asktom.oracle.com/
So … What Does Oracle Database 11g
Mean To Me?

© 2010 Oracle Corporation 2


So … What Does Oracle Database 11g
Mean To Me?

Change
© 2010 Oracle Corporation 3
What do you have from the past…

• Online Parameter Changes


• Online Major Memory Changes
• Online Schema Evolution
• Online Index Creates
• Quiesce
• Rolling Upgrades
• Online Disk reconfiguration (ASM)
• Online Cross Platform Tablespace Transport
• Full Database Transports
• And more….

© 2010 Oracle Corporation 4


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 5


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 6


Active Data Guard:
Develop & Test on Standby DB
Production
Database

• Use physical standby database


for development & testing
Developers, • Preserves zero data loss in test/dev mode
Testers
• Flashback DB to back-out
changes & use as standby
Eliminates cost of
Standby idle DR system
Database

© 2010 Oracle Corporation 7


Rolling Database Upgrades
Upgrade

Redo Patch Set


Clients Upgrades
A B Logs A B
Queue

Major
Version X Version X X X+1 Release
1 2 Upgrades
Initial SQL Apply Config Upgrade node B to X+1

Redo Redo Cluster


Upgrade A B A B
Software &
Hardware
Upgrades

X+1 X+1 X X+1


4 Switchover to B, upgrade A 3 Run in mixed mode to test

© 2010 Oracle Corporation 8


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 9


Make Change Safe -
Realistic Testing with Database Replay

• Recreate actual production database workload in test environment


• No test development required
• Replay workload in test with production timing
• Analyze & fix issues before production

Client Client Client


… Production Test

Middle Tier Replay DB Workload

Capture DB Workload … …
Test migration
Oracle DB to RAC

Storage

© 2010 Oracle Corporation 10


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 11


Make Change Safe –
Find Regressed SQL with SQL Performance Analyzer

© 2010 Oracle Corporation 12


Automatic SQL Tuning in 11g

Implement Test SQL Profiles


SQL Profiles

Workload
Generate
Recommendations

Choose
Candidate
SQL SQL Tuning
one Candidates
week
It’s Automatic!

View Reports /
AWR Control
DBA Process

© 2010 Oracle Corporation 13


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 14


Without SQL Plan Management
• Challenging to "freeze" execution plans and statistics
• Difficulty:
• Statement has been parsed and a plan got created
Verification happens during execution:
GB

Parse Execute Plan acceptable


HJ

HJ

• Now some conditions get changed (statistics, upgrade, parameters)


• A new plan will be created - is it better or worse???
GB

Parse Execute Plan possibly


NL
not acceptable
NL

© 2010 Oracle Corporation 15


SQL Plan Management

• First preventive and fully transparent database


mechanism to ensure plan stability
• SQL execution plans will be recorded
• A SQL Baseline will be created
• Consist of accepted execution plans
• Contains only plans for statements being parsed/executed more
than once
• Only known, verified and accepted plans will be used
• Package: DBMS_SPM

© 2010 Oracle Corporation 16


SQL Plan Management - Scenarios

• Upgrade scenario 1:
• Parameterize the optimizer back to the "old" behaviour
• Works for all database releases since 8.0.3
• Upgrade scenario 2:
• Transport the well known plans to the new release
• Works since 10gR2
• Also works with stored outlines (pre 10g) with
DBMS_SPM.MIGRATE_STORED_OUTLINE
• Ship a new application (module) along with appropriate SQL plan
baselines:
• Ship the best execution plans for the new statements within a staging
table and ensure that they'll be used
• Works since 11g

© 2010 Oracle Corporation 17


SQL Plan Management - New Application
• New application (module) gets delivered - and it's possible
to deliver the right execution plans, too:

• @Software Vendor:
• Create a staging table using
DBMS_SPM.CREATE_STGTAB_BASELINE
• Pack the required baselines into the staging table using
DBMS_SPM.PACK_STGTAB_BASELINE
• Export the staging table into a dump file using Data Pump or Export
and transport it to the target system

• @Customer:
• Import the dump file into the target database
• Unpack the SQL Plan Baselines from the staging table into
the SQL Management Base of the target system
• DBMS_SPM.UNPACK_STGTAB_BASELINE

© 2010 Oracle Corporation 18


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 19


Flashback for Rapid Recovery from
Human Error

Flashback
Flashback Flashback Flashback Data Archive
Query Tables Database and
Transaction

© 2010 Oracle Corporation 20


Flashback Data Archive

Select * from orders


• Flashback Data Archive AS OF
• Easy, practical way to add ’12am 31-Dec-2003’
“time dimension” to your data
• For change tracking, ILM,
ORDERS
auditing, compliance, …
Archive
• Query data “AS OF” any time in Tables
the past
• Efficient storage / retrieval of
undo data User Flashback Data
Tablespaces Archive

Total Recall

© 2010 Oracle Corporation 21


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;

• Guaranteed Restore Point


• Similar to storage snapshots
• Overrides the FLASHBACK_RETENTION_TARGET
• Attention: A guarantee restore point can stop the whole database 
SQL> CREATE RESTORE POINT grpt
GUARANTEE FLASHBACK DATABASE;
SQL> FLASHBACK DATABASE TO RESTORE POINT grpt;

© 2010 Oracle Corporation 22


What do you need?
Capture and
Replay Workload

Detect and Tune


Performance Changes
Set Up Test
Environments

SQL Plan Management

Online Application
Upgrade Total Recall

© 2010 Oracle Corporation 23


<Insert Picture Here>

How to get there

© 2010 Oracle Corporation 24


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

© 2010 Oracle Corporation 25


Documentation

• Note:785351.1 Upgrade Companion 11g Release 2

© 2010 Oracle Corporation 26


What are my upgrade paths?
Predictable performance post-upgrade

9.2.0.8

10.1.0.5

 10.2.0.2
11.2

SQL Plan Management


Automated SQL tuning
 11.1.0.6 Real Application Testing

© 2010 Oracle Corporation 27


QUESTIONS
ANSWERS

Das könnte Ihnen auch gefallen