Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
August 2012
August 2015
R2
July 2010
July 2013
January 2009
January 2012
Sustaining Support
Premier Support
R2
July 2007
Extended Support
July 2008
July 2010
t
2002 2003 2004 2005 2006 2007
http://www.oracle.com/support/library/brochure/lifetime-support-technology.pdf
2008
2009
2010
2011
2012
2013
2014
2016
2015
Premier Support
Extended Support
No
Sustaining Support
Pre-existing Only
No No No No No
Auto-Tuning
Advisory Instrumentation
Auto-Tuning
Advisory Instrumentation
Documentation
Note: 466181.1 Upgrade Companion 10gR2
Documentation
Note: 601807.1 Upgrade Companion 11g
Documentation
Note: 601807.1 Upgrade Companion 11g
A Support capability that automates configuration information exchange between Oracle and our customers enabling faster resolution and proactive detection of customer issues. My Oracle Support utilizes core configuration management capabilities available from Oracle Enterprise Manager and provides: The ability to define configurations and organize projects A view of System details and changes Create, track, and status Service Requests Advanced Knowledge Management capabilities Proactive problem avoidance with HealthChecks Proactive Product and Security Alerts
SCM
Knowledge Management
Oracle CCR
Customer Site
What is a system?
Systems are named collections of hardware, software, and operating system running on a machine
JServ level
Configuration files Zones
Database level
Config version Control files Data files Instance information Feature usage High water mark Initialization parameters Session high water mark Options Redo logs Rollback segments SGA Tablespaces Database users Statspack configuration
eBusiness Suite
# of active users Applied patches Custom forms Applications system summary Applications topology Comprising patches Component versions Config version Custom applications Profile options registered under custom app. Custom database objects Cust. Hooks Custom message count Custom objects owned by Apps Custom request sets Responsibility count Custom triggers Custom value sets table validated Custom value sets other Custom workflows Data groups Database version End-Dated users Generic service components parameters High priority patches not applied JTF hooks Localization modules NSL languages Other customizations Application patch levels Printers Printer drivers Profile options Registered Oracle users Technology stack inventory (DB)
Host level
Operating system initialized services Operating system ULIMITs Hardware CPUs IO devices Network interfaces Operating system Component File system Modules OS parameters Registered software
Infrastructure level
Apps web configuration Apps web configuration files Context files Database configuration Database configuration files Custom context variables Environment context variables Global context variables Host context variables Install context variables Process context variables System context variables Technology stack inventory (file system) Workflow mailer configuration Workflow mailer configuration files
Configuration Manager
Oracle Configuration Manager and Oracle Enterprise Manager You do not need to install Enterprise Manager (EM) in order to use the Oracle Configuration Manager. If EM Agent is already installed, you may also install the Oracle Configuration Manager EM and Oracle Configuration Manager send data to different repositories: Enterprise Manager sends to EM Repository, Oracle Configuration Manager sends to Customer Configuration Repository at Oracle Support. To manage your Oracle system with EM and also send Configuration data back to configuration manager in My Oracle Support or MetaLink, each must be installed on the system.
Complete loss of service or resources and work cannot reasonably continue - the work is considered mission critical
Escalation Process
Call US: 800 223 1711
Other Global Support Hot Lines: http://www.oracle.com/support/contact.html
V.P. or Executive
Senior Manager or Director
Global Customer Care is a highly available expert resource that resolves customers' business-related inquiries while capturing and sharing feedback to enhance the customer relationship.
Responsibilities include but are not limited to:
Access and navigation of Oracle Support websites (including Metalink) Placing software orders Assisting with CSI questions Assisting with product or platform issues related to SR logging Locate and provide published information Create software upgrade orders
Instructions for registering and viewing both live and archived webcasts
The current menu of scheduled webcasts to choose from
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
Dictionary Statistics
Create dictionary statistics prior to the upgrade - otherwise it will take significantly longer
SQL> EXECUTE dbms_stats.gather_schema_stats
('SYS', options estimate_percent method_opt cascade
=> 'GATHER', => DBMS_STATS.AUTO_SAMPLE_SIZE, => 'FOR ALL COLUMNS SIZE AUTO', => TRUE);
Detailed scripts can be found here: Oracle Database Upgrade Guide Appendix B
Or in
Post Upgrade
Create system statistics during a regular workload period otherwise non-appropriate values for the CBO will be used:
SQL> EXECUTE dbms_stats.gather_system_stats('start'); ... SQL> EXECUTE dbms_stats.gather_system_stats('stop');
SQL> select pname NAME, pval1 WERT, pval2 INFO from aux_stats$;
NAME WERT INFO -------------------- ---------- -----------------------------STATUS COMPLETED DSTART 04-07-2008 12:30 DSTOP 05-07-2008 12:30 FLAGS 1 CPUSPEEDNW 1392,39 IOSEEKTIM 11,405 IOTFRSPEED 25595,605 ...
Post Upgrade
Create fixed table statistics soon after the upgrade:
SQL> execute dbms_stats.gather_fixed_objects_stats;
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
STATSPACK
Database performance tool - pre-10g
Note:394937.1 STATSPACK guide Export the PERFSTAT user
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
"The Database Replay and SQL Plan Management features alone are worth upgrading to Oracle Database 11g "
Arup Nanda Senior Director of Database Engineering and Architecture Starwood Hotels and Resorts Worldwide
Challenge
Parse
HJ
Execute
Plan acceptable
HJ
Now some conditions get changed (e.g. upgrade) A new plan will be created - is it better or worse???
GB
Parse
NL
Execute
NL
Only known and verified and accepted plans will be used Package: DBMS_SPM
Parse
HJ
Execute
Plan acceptable
HJ
Initial plan will be accepted if repeated and will be added to the SQL Plan Baseline
Plan Baseline
GB HJ HJ
Parse
NL
NL
New plan will be added to the Plan History but it won't be used unless it has been verified
Plan History
GB NL NL
Plan Baseline
GB
HJ HJ
Parse
HJ
Execute
HJ
The optimizer will use only one of the VERIFIED plans stored in the SQL Baseline because only these will guarantee PLAN STABILITY
Plan History
GB NL NL GB HJ HJ
Plan Baseline
Plan History
GB GB NL NL HJ HJ NL NL
Plan Baseline
GB
Worse plan will be kept in the Plan History and deleted automatically
Plan History
GB NL NL GB NL
Plan Baseline
GB HJ NL HJ
Equal or better plans can be added to the SQL Plan Baseline DBA schedules verification
DBA
Optimizer
Upgrade scenario 2:
Transport all well known plans to the new release Works since 10gR2
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 10gR2
Plan Baseline
GB NL NL HJ GB HJ GB NL NL
NL NL
Now: Different plans created with OFE=11 will be added to the Plan History for later verification
STS
Plan Baseline
GB NL NL HJ GB HJ GB NL NL
NL NL
Every new better plan found in 11g will be added to the Plan History
Table
Table
DBMS_SPM.UNPACK_STGTAB_BASELINE DBMS_SPM.PACK_STGTAB_BASELINE
Plan Baseline
GB NL NL HJ GB HJ GB
Plan Baseline
GB NL NL NL HJ GB HJ GB NL NL
NL
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
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 sub-systems of the database server using real production workload
SQL Concurrency
How it works?
When to use?
Dependency
Speed up/down
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
SQL Performance Analyzer Database Replay
Challenge
How do I find out which plans will be changed? How do I verify parameter changes?
SPA interface
Rich GUI through Enterprise Manager Command line interface through DBMS_SQLPA PL/SQL package
Test
Re-execute SQL
Middle Tier
Capture SQL
Oracle DB
Transport SQL
Storage
Transport STS
(6)
Reiterate
No
Done?
Yes
SPA Workflows
Possible workflows:
Optimizer upgrade simulation (Start: 8.0.0) Init parameter change Guided workflow for manual changes
Goal: Assess impact of upgrade on SQL workload performance so that there are no surprises after upgrade. Once upgraded to 11g new features can be enabled one at a time.
3 2 4 1
Parameter Changes
SPA Recommendation: SQL Tuning Advisor
1 3
Parameter Changes
SQL Tuning Advisor offers SQL Profiles
Parameter Changes
SPA run after SQL Profiles had been applied
Event 10046
ORCL_ora_133674.trc ORCL_ora_133674.trc ORCL_ora_133674.trc ORCL_ora_133674.trc ...
copy
STS
Owner
SH1 SH2
Name
SAL1 CUST
exp / imp
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A
SQL Performance Analyzer Database Replay
Challenge
How will my system perform after an upgrade? Will all application calls work in 11g?
Database Replay
Capture and replay an actual production database workload Identify, analyze and fix potential instabilities before making changes to production Capture Workload in Production
Capture full production workload with real load, timing & concurrency characteristics Move the captured workload to test system
Production System
Client
Client
Client
File System
Middle Tier
Independent of client protocol Can capture on 9.2.0.8 and replay on 11g Capture load for interesting time period, e.g., peak workload, month-end processing, etc.
Storage
File 1
File 2
File n
Test System
File 1
File n
File n
Pre-processing transforms captured data into replayable format Once pre-processed, workload can be replayed many times
Test System
Replay Clients
File 1 File 2
File n
Metadata
Replay Files
Database Replay
Step-By-Step
Database Replay
1. Create a copy of the database to replay the workload
RMAN Duplicate Snapshot Standby
Database Replay
2. Workflow in EM: Workload Capture
Database Replay
2. Preparation steps in EM: Workload Capture
Database Replay
3. Workload Filter:
Database Replay
4. Prepare an empty directory for capture files
Database Replay
Job scheduling - specify time frame for capture:
Database Replay
Database Control - capture review and submit:
Database Replay
Database Control - capture summary:
Database Replay
Database Control - capture statistics:
Database Replay
Preprocessing captured workload:
Database Replay
Replaying the captured workload:
Database Replay
Choose directory containing preprocessed capture files
Database Replay
Workload Replay - choose replay name:
Database Replay
Workload Replay: Wait for replay clients to connect
Database Replay
Workload Replay Clients: Calibrate
$> wrc mode=calibrate replaydir=/tmp/testing
Database Replay
Workload Replay: WRC client(s) connected
Database Replay
Monitor Workload Replay during replay
Database Replay
Monitor divergence stats:
Database Replay
Workload Replay result:
Database Replay
Workload replay reporting:
Note: 601807.1 Upgrade Companion 11g Note: 429825.1 Complete Checklist for Manual Upgrades to 11g Note: 454506.1 Known Issues and Alerts 11.1.0.6
Performance Testing
Note: 560977.1 Real Application Testing available for earlier releases Note: 562899.1 Using SQL Performance Analyzer for upgd. 9.2 to 10.2 Note: 394937.1 Statspack Guide Note: 295819.1 Potential Query Tuning Related Issues Note: 345048.1 GROUP BY does not sort if you don't use ORDER BY Upgrading to Oracle Database 10g: What to expect from the Optimizer
Agenda
Recap
Challenges & Best Practices AWR & STATSPACK SQL Plan Management Real Application Testing Q&A