My Oracle Support Banner

Real Application Testing (RAT) PL/SQL API Setup and Verification (Doc ID 1083063.1)

Last updated on MARCH 08, 2023

Applies to:

Oracle Database Backup Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 11.1.0.7 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.

Goal

The purpose of this document is to provide a simple Real Application Testing (RAT) setup and verification using APIs. Please refer to "Oracle Database Real Application Testing User's Guide" for complete product details and Enterprise Manager interface. The following testing was done in 11.1.0.7.0 and output may be different per release.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 1.  Initial Setup and Verification
 1.1 Verify Real Application Testing option is installed at both 'Capture' and 'Replay' instances.
 1.2 (Capture) Identify the ORACLE_SID of the capture database.
 1.3 (Capture) Confirm the dbms_workload_capture package exists and is valid.
 1.4 (Replay). Identify the ORACLE_SID of the replay database and confirm replay packages exist.
 1.5 Install all required patches
 2. On the Capture instance, capture a workload
 2.1 Create a new directory object to store the workload information.
 2.2 Restart the capture database in restricted mode (Optional).
 2.3 Start the workload capture.
 2.4 Generate the workload. For testing run simple SQL scripts.
 2.5 After workload is complete, end the workload capture.
 2.6 Identify the workload capture ID 
 2.7 Review the workload capture report with API
 2.8 Export capture workload AWR data into the workload directory.
 2.9 Get the AWR report for the capture workload period by running @?/rdbms/admin/awrrpt for the given begin and end snapshots below: (See Document 276103.1).
 3. On the Replay instance: preprocess, initialize, prepare, and then replay a captured workload. 
 3.1 Confirm that the replay instance has the same data as at the time of the start of the capture
 3.2 Create a directory on the OS and in the replay database to perform the replay 
 3.3 Copy the files created by the capture instance to the replay directory.
 3.4 Preprocess the captured workload
 3.5 Initialize workload replay.
 3.6 Put the replay database in replay state.
 3.7 Start the replay clients
 3.8 Execute workload replay.
 3.9 Generate the replay report.
 3.10 Import Capture AWR data into the Replay database to compare both capture and replay AWR data.  
 Appendix A: Sample dbms_workload_capture.report. 
 Appendix B: Sample dbms_workload_replay.report.
 How to delete a capture
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.