28
<Insert Picture Here> Oracle Database 11g What Does This Mean? Thomas Kyte http://asktom.oracle.com/

Oracle Database 11g –What Does This Mean? Thomas Kyte

Embed Size (px)

DESCRIPTION

Oracle Database 11g –What Does This Mean?Thomas Kyte

Citation preview

Page 1: Oracle Database 11g –What Does This Mean? Thomas Kyte

<Insert Picture Here>

Oracle Database 11g – What Does This Mean?

Thomas Kyte

http://asktom.oracle.com/

Page 2: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 2

So … What Does Oracle Database 11g

Mean To Me?

Page 3: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 3

So … What Does Oracle Database 11g

Mean To Me?

Change

Page 4: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 4

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….

Page 5: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 5

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 6: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 6

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 7: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 7

Active Data Guard:

Develop & Test on Standby DB

• Use physical standby databasefor development & testing• Preserves zero data loss in test/dev mode

• Flashback DB to back-outchanges & use as standby

Production

Database

Standby

Database

Developers,

Testers

Eliminates cost of idle DR system

Page 8: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 8

Rolling Database Upgrades

Major

Release

Upgrades

Patch Set

Upgrades

Cluster

Software &

Hardware

Upgrades

Initial SQL Apply Config

ClientsRedo

Version X Version X

1

BA

Switchover to B, upgrade A

Redo

4

Upgrade

X+1X+1

BA

Run in mixed mode to test

Redo

3

X+1X

A B

Upgrade node B to X+1

Upgrade

Logs

Queue

X

2

X+1

A B

Page 9: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 9

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 10: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 10

……

ClientClient

…Client

Capture DB Workload

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

Middle Tier

Storage

Oracle DB

Replay DB Workload

Production Test

Test migration to RAC

Page 11: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 11

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 12: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 12

Make Change Safe –Find Regressed SQL with SQL Performance Analyzer

Page 13: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 13© 2010 Oracle Corporation 13

It’s Automatic!

Choose

Candidate

SQL

one

week

Automatic SQL Tuning in 11g

Workload

SQL Tuning

Candidates

Test SQL ProfilesImplement

SQL Profiles

Generate

Recommendations

AWRDBA

View Reports /

Control

Process

Page 14: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 14

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 15: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 15© 2010 Oracle Corporation 15

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:

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

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

HJ

HJ

GB

Parse Execute Plan acceptable

NL

NL

GB

Parse Execute Plan possiblynot acceptable

Page 16: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 16© 2010 Oracle Corporation 16

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

Page 17: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 17© 2010 Oracle Corporation 17

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

Page 18: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 18© 2010 Oracle Corporation 18

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

Page 19: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 19

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 20: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 20

Flashback for Rapid Recovery from

Human Error

FlashbackDatabase

FlashbackData Archive

and Transaction

FlashbackTables

FlashbackQuery

Page 21: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 21

Flashback Data Archive

• Flashback Data Archive

• Easy, practical way to add

“time dimension” to your data

• For change tracking, ILM,

auditing, compliance, …

• Query data “AS OF” any time in

the past

• Efficient storage / retrieval of

undo data User

Tablespaces

Flashback Data

Archive

Archive

Tables

Select * from ordersAS OF’12am 31-Dec-2003’

Total Recall

ORDERS

Page 22: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 22© 2010 Oracle Corporation 22

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

• 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 rpt;

SQL> FLASHBACK DATABASE TO RESTORE POINT rpt;

SQL> CREATE RESTORE POINT grpt

GUARANTEE FLASHBACK DATABASE;

SQL> FLASHBACK DATABASE TO RESTORE POINT grpt;

Page 23: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 23

What do you need?

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

SQL Plan Management

Total RecallOnline Application

Upgrade

Page 24: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 24

<Insert Picture Here>

How to get there

Page 25: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 25© 2010 Oracle Corporation 25

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

Page 26: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 26

Documentation

• Note:785351.1 Upgrade Companion 11g Release 2

Page 27: Oracle Database 11g –What Does This Mean? Thomas Kyte

© 2010 Oracle Corporation 27

What are my upgrade paths?Predictable performance post-upgrade

10.2.0.2

11.1.0.6

10.1.0.5

9.2.0.8

11.2

SQL Plan Management

Automated SQL tuning

Real Application Testing

Page 28: Oracle Database 11g –What Does This Mean? Thomas Kyte

Q U E S T I O N S

A N S W E R S