Real Application Testing
Oracle Real Application Testing (RAT) is a separately licensed option of the Oracle 11g database available only with Oracle Enterprise Edition. RAT can be used to capture, analyse and replay database transactions. During replay, RAT can maintain the original transaction concurrency, timing and dependencies.
RAT will make it easier to do upgrades, hardware replacements, and operating system changes.
RAT consists of two components:
- Database Replay - capture production workload and replay it on a different (possibly test) environment.
- SQL Performance Analyzer - identifies SQL execution plan changes and performance regressions.
Database Replay consists of 4 main steps. On the production database:
- Workload Capture
On the performance testing system:
- Workload Preprocessing
- Workload Replay
- Analysis and Reporting
 Workload Capture
Create directory for captured files:
SQL> CREATE DIRECTORY capdir AS '//app/oracle/capdir'
EXEC DBMS_WORKLOAD_CAPTURE.START_CAPTURE(name=>'peak_time', dir=>'capdir', duration=>600);
 Workload Preprocessing
Preprocess a captured workload: EXEC DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE(capture_dir=>'capdir');
 Workload Replay
Start some "replay clients" (wrc executable:
wrc mode=calibrate replaydir=/app/oracle/replaydir
wrc system/oracle@test mode=replay replaydir=/app/oracle/replaydir
 Analysis and Reporting
RAT can be monitored by selecting from v$workload_replay_thread and DBA_WORKLOAD_CAPTURES.
 Also see
- RAT is documented in the Oracle Database Performance Tuning Guide.