Real Application Testing

From Oracle FAQ
Jump to: navigation, search

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.

Overview[edit]

Database Replay consists of 4 main steps. On the production database:

  1. Workload Capture

On the performance testing system:

  1. Workload Preprocessing
  2. Workload Replay
  3. Analysis and Reporting

Workload Capture[edit]

Create directory for captured files:

SQL> CREATE DIRECTORY capdir AS '//app/oracle/capdir'

Start capture:

EXEC DBMS_WORKLOAD_CAPTURE.START_CAPTURE(name=>'peak_time', dir=>'capdir', duration=>600);

Stop capture:

EXEC DBMS_WORKLOAD_CAPTURE.FINISH_CAPTURE();

Workload Preprocessing[edit]

Preprocess a captured workload: EXEC DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE(capture_dir=>'capdir');

Workload Replay[edit]

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[edit]

Monitoring[edit]

RAT can be monitored by selecting from v$workload_replay_thread and DBA_WORKLOAD_CAPTURES.

Also see[edit]

  • RAT is documented in the Oracle Database Performance Tuning Guide.