Managing Change with Real Application Testing and Snapshot Standby Barry Hodges Senior Solution Architect, Sales Consulting, Oracle NZ
“The art of progress is to preserve order amid change.” Alfred North Whitehead British Mathematician and Philosopher,
IT Challenges
Motivation for change Database Tier Database Upgrades, Patches, Schema, Parameters, RAC nodes, Interconnect, OS Platforms, OS Upgrades, CPU, Memory, etc Application Upgrades, Object Modifications, etc Application Tier SAN Upgrades, ASM, more disk, etc Storage Tier
Database Upgrade Process: Steps 1.Gather information about PROD environment 2.Determine upgrade path & method 3.Prepare B/R strategy, clone and setup Test DB 4.Establish performance baseline before upgrade 5.Develop tests for database & applications 6.Test upgraded database & applications 7.Check performance before & after upgrade 8.Remediate regressions 9.Go Live! Majority of effort spent in developing tests, detecting and remediating regressions
Current Testing Methodology PRODUCTION TEST Need to provision the whole stack BA’s id top n business transactions Test Scripts need to be constantly rewritten as data changes Simulated load 80/20? Simulate load by over throttling? Can we trust the simulated load? What is the correct throughput? Can we account for selects? Requires specialised application knowledge
Database Upgrade Process: Steps 1.Gather information about PROD environment 2.Determine upgrade path & method 3.Prepare B/R strategy, clone and setup Test DB 4.Establish performance baseline before upgrade 5.Develop tests for database & applications 6.Test upgraded database & applications 7.Check performance before & after upgrade 8.Remediate regressions 9.Go Live! Majority of effort spent in developing tests, detecting and remediating regressions Real Application Testing Real Application Testing provides realistic testing for real-world systems
Database Replay Replay actual production database workload in test environment Identify, analyse and fix potential instabilities before making changes to production Capture Workload in Production –Capture full production workload –Move the captured workload to test system Replay Workload in Test –Make the desired changes in test system –Replay workload with with production load, timing & concurrency characteristics –Honor commit ordering Analyze & Report –Errors –Data divergence –Performance divergence
Database Replay Workload Capture PRODUCTION Replay TEST
SQL Performance Analyzer Identify SQL performance regression before end-users are impacted Identify, analyse and fix potential instabilities before making changes to production Re-execute SQL queries in Test –Make the desired changes in test system –Statements can be re-executed as often as is necessary in the test environment Analyze & Report –Highlight improvements –Highlight regressions –Highlight highest impact statements –Use SQL Tuning Advisor to tune regressed statements Capture SQL in Production –Capture SQL workload in production including statistics & binds –Move the SQL Tuning Set to test systemSQL
SQL Performance Analyzer STS SQL Capture PRODUCTION Replay TEST
Unsupported Supported Changes Database Upgrades (9i, 10g 11g), Patches, Schema, Parameters, RAC nodes, Interconnect, OS Platforms, OS Upgrades, CPU, Memory Application Upgrades, Some Object Modifications Database Tier Application Tier Storage Tier SAN Upgrades, ASM, more disk, etc Supported
Current Testing Methodology DB Replay: 2 weeks LoadRunner: 30 weeks Total Testing Time Install & Setup Understand Application Usage Identify Key Transactions Generate Workload Run Test Effort (Days)
Real Application Testing Demo Production (wgn1) Standby (wgn1sby) Dell OPTIPLEX 755 Intel(R) Dual Core(TM)2 Duo 2.33GHz 4 GB RAM Oracle Enterprise Linux 5.1 Oracle
Real Application Testing Demo Production (wgn1) Standby (wgn1sby) Data Guard
Real Application Testing Demo DGMGRL> convert database 'sid' to snapshot standby; Standby (wgn1sby) Production (wgn1) Data Guard
Real Application Testing Demo Capture Standby (wgn1sby) Production (wgn1)SQL Data Guard
Real Application Testing Demo Prepare Standby (wgn1sby) Production (wgn1) Data Guard
Real Application Testing Demo Replay Standby (wgn1sby) Production (wgn1)SQL Data Guard
Real Application Testing Demo Report & Analyze Standby (wgn1sby) Production (wgn1) Data Guard
Real Application Testing Demo DGMGRL> convert database 'sid' to physical standby; Standby (wgn1sby) Production (wgn1) Data Guard
Value Proposition No Yes Integrated with AWR, ASH, SQL Tuning Advisor & SQL Plan Management Transfer resolutions to production No not integrated with optimizer Yes Test with production context No require explicit polling & external storage Yes Capture with low overhead 3 rd Party SQL Testing Tools Oracle DB Replay & SPA Technology that can only be built by Oracle
Value Proposition To:From: Complete workflows Partial workflows Low risk High risk Automated Manual intensive Production workloads Artificial workloads Days of development Months of development Days Weeks Database Tier Complete Stack
Oracle.com: Oracle Real Application Testing on OTN: e/index.html Oracle Real Application Testing white papers: /real-application-testing-whitepaper.pdf e/pdf/ow07/db_replay_white_paper_ow07_1.pdf e/pdf/ow07/spa_white_paper_ow07.pdf Resources