Professional Documents
Culture Documents
Rat
Rat
Rat
July 2012
Database testing is an urgent need to conduct any infrastructure related change smoothly. Oracle Real Application Testing helps reduce unexpected production problems drastically, minimize testing cycle and develop more realistic database testing scenarios. This white paper discusses how Oracle Real Application Testing can help organizations to achieve database testing need for any change on the infrastructure which impacts Oracle production database.
|
Contents
Introduction............................................................................................3 Oracle Real Application Testing ........................................................3
What is Real Application Testing .................................................................. 3 Pre Requisites ................................................................................................... 6 Benefits .............................................................................................................. 6 Challenges ......................................................................................................... 7
Introduction
Change in the IT Infrastructure stack is a regular affair in any organization. Normally, any change in the infrastructure would have an impact on the production database. Most of these impacts are smaller, in the line of database downtime, service interruption or flood of incidents etc. However, changes like upgrades, migrations, business growth or more to handle workload are the major worries for organizations due to their profound impact on the production system. Database testing is an urgent need to conduct any infrastructure related change smoothly. One challenge that has come up in database testing is the inability to simulate production like realistic load during testing for validating system change. Customer concerns How can more realistic testing benefit our organization and lifecycle projects? How can we gain deeper insights into actual production workloads? Solutions and techniques to improve effectiveness and efficiency of database testing? How to develop a broad approach for test covering all aspects of the change?
Customers are in greater need of best practices in database testing or suitable tool which will help them minimize risks for production systems during system change and also improve effectiveness of database testing. Oracle Real Application Testing is one of such promising tools to conduct testing on Oracle database for any infrastructure related change.
RAT consists of two components: Database Workload Replay: Captures the production workload and replays the same workload on a test environment SQL Performance Analyzer: Identifies SQL execution plan changes and performance regressions for the planned change
Database Workload Replay Customers want to identify full impact of the change. Validation through exhaustive testing is expensive and difficult to emulate. Moreover, testing success rate is low as many issues go undetected during testing. Inability to simulate production like realistic load is a major cause for low success rate of testing. Database workload replay helps to conduct a complete realistic testing as it tests on the real production load.
SQL Performance Analyzer SQL Performance Analyzer (SPA) tests the impact of change on SQL query performance. SPA captures the SQL workload in production with statistics and bind variables. SPA re-executes the same production SQL queries in the test environment. SPA can predict the performance deviation of the queries and helps to tune the application queries before actual change.
To Be Database
Import mapping table Load SQL queries to STS Create & Execute 11g STS Analysis Task Reporting & Analysis
Oracle Real Application Testing can be accessed through Oracle Enterprise Manager and API. Salient features of Oracles Real Application Testing:
RAT provides complete coverage for entire change lifecycle RAT is very easy to configure RAT requires same effort for testing major, minor changes and for small, big database Using RAT we can foresee impact of any change No need to simulate artificial load for RAT
Pre Requisites
License Requirements Use of SQL Performance Analyzer and Database Replay requires the Oracle Real Application Testing licensing option. Required Patch Sets Following patch sets need to be applied on Source Database (Oracle 10.2.0.5) one-off patch 9373986 Target Database (Oracle 11.2.0.2) - one-off patch 11870615 or 13947480.
For other version of source and target, please follow the Oracle Metalink document ID 560977.1 (Real Application Testing Now Available for Earlier Releases). Note: If OEM Grid control is used for SQL Performance Analyzer with 11.2.0.2.0 database, it is recommended to apply patch number 10402264 for Database 11.2.0.2.0. Data Requirement Both the source and target database should have the identical data as of the capture time. AS IS database needs to be restored to the test environment after data masking as on the capture time. Data can be restored through user managed backup or RMAN backup or snapshot standby or export and import.
Benefits
Oracle RAT provides a host of benefits for database testing for any planed change. With Oracle Real Application Testing, customer can derive the following benefits: Improved Testing Quality: Database Workload Replay allows testing impact of a system change by replaying real world workload on the test environment before the change goes live. Provides Crystal Clear View of Performance Demarcation: RAT provides a clear demarcation of performance before and after the change. PoC clearly shows the performance difference between Oracle10g & Oracle11g. Reduced Testing Cost: RAT helps reduce the testing efforts significantly. Compared to LoadRunner, total testing time was reduced to one forth.
6
Faster Technology Adoption: Oracle RAT demonstrates the real change in database behaviour. RAT enhances customers confidence for technology refresh, upgrade, migration etc. Tune Changes before Implementation: RAT helps in fine tuning the change. Database Replay can be used to fine tune the expected change and test again using Database Replay. Lower Risks: Risks for any change which impacts the database is reduced as RAT can clearly shows the real database performance of AS IS (before change) and TO BE (after change) database.
Challenges
Oracle Real Application Testing comes with a few challenges like: Can be applicable for the change if the target database version is Oracle11g only Need test database with similar system configuration (CPU, memory, number of nodes, storage configuration) System performance (OS, network, storage and application) cannot be measured as the capability of RAT is limited to database only.
Assessment Study
Wipro in Infrastructure Testing
Wipro is a leading market player in IT infrastructure management and global IT infrastructure outsourcing. Wipro ensures guaranteed benefits to customers in terms of quality, service excellence, innovation and cost transformation. Being an industry expert, Wipro also offers infrastructure testing services to its customers to ensure smooth execution of any infrastructure related change. Wipros infrastructure testing team has conducted a proof of concept (POC) on the feasibility of using Oracle RAT as a database testing tool. A proof of concept is a realization of a certain method or idea(s) to demonstrate its feasibility or a demonstration in principle, whose purpose is to verify that some concept or theory has the potential of being used.
7
POC Report
Environment The environments used for the proof of concept were:
Environment OS Version Database Version Production (Source) Red Hat Linux 4 Oracle 10.2.0.5 RAC Test Database (Target) Red Hat Linux 4 Oracle 11.2.0.2 RAC
Approach The approach followed for the proof of concept which was conducted within a period of 6 weeks consisted of the following steps: Workload was captured in the production database The same workload was replayed in a test database Reports were generated for both Capture and Replay All the reports were verified by the Wipro infrastructure testing team After analysis, the observations and recommendations on the proof of concept were documented
Result Through the proof of concept on Oracle Real Application Testing, it became crystal clear that the performance of the database was better in Oracle11g compared to Oracle10g. The PoC results show more performance benefits of the production database in Oracle11g (TO BE) compared to Oracle10g (AS IS). RAT is beneficial for testing the database if the target version of change is Oracle11g.
HP - LoadRunner
Good for application performance testing to simulate load through identification of key transactions and establishing transaction concurrency Takes long time to understand application usage, identify key transactions and generate workload
All these tools mentioned above can be used for Oracle Database testing. A comparative study of these tools with Oracle RAT is shown below.
Analysis of Oracle Database Testing Tools Tools Measurement Criteria Workload Replay Performance Analyzer Test Data Management Data Masking Oracle RAT Matured Matured NA NA IBM Optim Just Released NA Matured Matured Good for DB2 database testing. Useful for workload replay, test data management and data masking. Complex configuration, beginner in Database Replay Yes 9 Solix EDMS NA NA Matured Matured HP LoadRunner NA Matured NA NA Good for individual query performance comparison and application performance testing. Time consuming (required effort is almost 4 times more than RAT) Yes
Merit
Good for Subsetting & Masking the Test Data. Does not have workload replay and performance analyzer option Yes
Here the field Matured indicates an efficient tool for that specific requirement. Maturity is defined based on the cost, ease of usage, scalability, reliability, documentation, vendor support.
Conclusion
After a thorough analysis of a couple of relevant tools for database testing, RAT was identified as a potential tool for testing Oracle database for any change. The proof of concept has validated the expectation on usage of RAT as an efficient testing tool for Oracle database. Oracle RAT can be recommended as an efficient database testing tools for conducting any infrastructure related change which impacts Oracle database. RAT can clearly calibrate the performance demarcation of AS IS and TO BE databases. Overall, the Wipro infrastructure testing team has the opinion that the Oracle RAT is an effective testing tool for Oracle database with a bouquet of useful features. It is an ideal tool for enterprise wide Oracle database testing.
Appendix
Acronym
Acronym API CPU DBA EDMS IT ITS OS Description
Application Programming Interfaces Central Processing Unit Database Administrator Enterprise Data Management Solutions Information Technology Infrastructure Testing Services Operating System
10
Proof of Concept Real Application Cluster Real Application Testing SQL Performance Analyzer Technology Infrastructure Services
References
Oracle: http://docs.oracle.com/cd/B28359_01/server.111/e12253/dbr_capture.htm#CACICAAC IBM: http://www-01.ibm.com/software/data/optim/ Solix: http://www.solix.com/solix_enterprise_data_management_suite.htm HP: http://www8.hp.com/in/en/software-solutions/software.html?compURI=1175451 Real Application Testing Now Available for Earlier Releases [Oracle Metalink Document ID 560977.1] Using the workload capture and replay in 11G [Oracle Metalink Document ID 445116.1]
11
Wipro Technologies Corporate Office: Doddakannelli, Sarjapur Road, Bangalore - 560 035 Phone: +91 (80) 28440011 Fax: +91 (80) 28440256
Copyright 2012. Wipro Technologies. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without express written permission from Wipro Technologies. Specifications subject without notice. All other trademarks mentioned herein are the property of their respective owners.