Professional Documents
Culture Documents
br
11g
CHANGE MANAGEMENT
Luciano Incio de Melo Oracle Database Administrator Certified Oracle Instructor Bacharel em Cincias da Computao - UNESP Mestre em Engenharia da Computao IPT/USP
www.en-sof.com.br 2 11g
SCHEDULE
1. 2. 3. 4.
www.en-sof.com.br
11g
SMP dominance
www.en-sof.com.br
11g
www.en-sof.com.br
11g
Realistic testing
www.en-sof.com.br 6 11g
Diagnose problems
(ADR/Support Workbench)
Provisioning automation
www.en-sof.com.br 7 11g
Redo stream
Redo stream
Perform testing
www.en-sof.com.br
11g
Database Replay
GB HJ HJ
Database Replay
GB HJ HJ
www.en-sof.com.br
11
11g
USAGE MODEL
1. 2. 3. 4. 5.
Capture SQL Workload Transport to a Test System Build Before Change Performance Build After Change Performance Compare and Analyze Performance
www.en-sof.com.br
12
11g
Cursor cache
Incremental capture
Database Instance
Production database
Incremental capture is used to populate STS from cursor cache over a period of time. STSs filtering and ranking capabilities filter out undesirable SQL.
13 11g
www.en-sof.com.br
Production database
Test database
Copy SQL Tuning Set to staging table (pack). Transport staging table to test system (data pump, DB link, etc). Copy SQL Tuning Set from staging table (unpack).
14 11g
www.en-sof.com.br
Test/execute
Before changes
Database instance
Test database
www.en-sof.com.br
11g
After changes
Database instance
After changes implemented
Test database
11g
Regression
Database instance
Test database
www.en-sof.com.br
17
11g
www.en-sof.com.br
18
11g
Database Replay
GB HJ HJ
Can preseed critical SQL with SQL Tuning Set (STS) from SQL Performance Analyzer
www.en-sof.com.br
20
11g
Plan history
HJ HJ GB HJ HJ GB HJ HJ
Plan baseline GB
Plan baseline GB
HJ HJ
SQL profile
Plan History
GB HJ HJ GB HJ HJ
Plan baseline GB
HJ HJ
www.en-sof.com.br
21
11g
dbms_spm
Plan history
ba se an lin Pl GB e
HJ HJ
Plan history 1
an Pl
ba
se lin e
GB HJ HJ
2
GB HJ HJ
GB HJ HJ
alter_sql_plan_baseline *_stgtab_baseline
3 Plan history
HJ
Cursor cache
Staging table
ba an GB seli l P ne
HJ
DBA
www.en-sof.com.br
22
load_plans_from_sqlset
11g
No plan regressions
No plan regressions
DBA
DBA
Welltuned plan
GB HJ HJ GB HJ HJ
Well-tuned plan
Development database
www.en-sof.com.br
23
11g
No plan regressions
GB HJ
GB HJ
No plan regressions
HJ
HJ
optimizer_features_enable=10.2.0.2 optimizer_capture_sql_plan_baselines=true
optimizer_features_enable=11.1.0.1 optimizer_capture_sql_plan_baselines=true
Better plans
Welltuned plans
optimizer_features_enable=11.1.0.1 optimizer_capture_sql_plan_baselines=true
www.en-sof.com.br
24
11g
DBA
>?
www.en-sof.com.br
25
11g
www.en-sof.com.br
26
11g
Database Replay
GB HJ HJ
www.en-sof.com.br
28
11g
DATABASE REPLAY
Re-create actual production database workload in test environment. Identify and analyze potential instabilities before making changes to production. Capture workload in production: Capture full production workload with real load & concurrency Move the captured workload to test system Replay workload in test: Make the desired changes in test system Replay workload with production load & concurrency Honor commit ordering Analyze and report: Errors Data divergence Performance divergence 29 11g
www.en-sof.com.br
www.en-sof.com.br
30
11g
1. 2. 3. 4. 5. 6. 7. 8.
Capture the workload on a database. (Task 1) Optionally export the AWR data. (Task 1) Restore the replay database on a test system. Make changes to the test system as required. Copy the workload to the test system. Preprocess the captured workload. (Task 2) Configure the test system for the replay. Replay the workload on the restored database. (Task 3)
31 11g
www.en-sof.com.br
www.en-sof.com.br
32
11g
www.en-sof.com.br
33
11g
www.en-sof.com.br
34
11g
www.en-sof.com.br
35
11g
www.en-sof.com.br
36
11g
www.en-sof.com.br
37
11g
www.en-sof.com.br
38
11g
www.en-sof.com.br
40
11g
www.en-sof.com.br
41
11g
www.en-sof.com.br
42
11g
www.en-sof.com.br
43
11g
www.en-sof.com.br
44
11g
www.en-sof.com.br
45
11g
www.en-sof.com.br
46
11g
www.en-sof.com.br
47
11g
$ wrc REPLAYDIR=/home/oracle/solutions/dbreplay USERID=system PASSWORD=oracle Workload Replay Client: Release 11.1.0.6.0 - Production on Tue Copyright (c) 1982, 2007, Oracle. All rights reserved. Wait for the replay to start (21:47:01) Replay started (21:48:14)
www.en-sof.com.br
48
11g
www.en-sof.com.br
49
11g
$ wrc REPLAYDIR=/home/oracle/solutions/dbreplay USERID=system PASSWORD=oracle Workload Replay Client: Release 11.1.0.6.0 - Production on Tue Copyright (c) 1982, 2007, Oracle. All rights reserved. Wait for the replay to start (21:47:01) Replay started (21:48:14) Replay finished (21:51:21) $
www.en-sof.com.br
50
11g
www.en-sof.com.br
51
11g
CHANGE MANAGEMENT
Maintaining service-level agreements through changes to hardware or software configurations
Change is the most common cause of instability.
e Actual workloads are difficult to simulate. l b i s Realistic testing before production is impossible. s