How to Perform Real Application Testing(RAT) using SQL Plus
Step 1. Capture the Load,using DBMS_WORKLOAD_CAPTURE
SQL > create directory <DIR NAME> as '<OS Location>';
SQL > exec dbms_workload_capture.start_capture(name => '<Name>', dir => '<CAPTUREDIR>');
<<Simulate the load or Capture during high load time>>
SQL > exec dbms_workload_capture.finish_capture();
SQL> exec dbms_workload_capture.export_awr (capture_id => 1);
Step 2. Process the load on Snapshot Standby using DBMS_WORKLOAD_REPLAY,
SQL > create directory <DIR NAME> as '<OS Location>';
$ cp <Capture load dir created in step 1>* <DIR location of step 2>
SQL> exec DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE (capture_dir => '<CAPTUREDIRstep2>');
Step 3. Replay multiple time,
SQL> exec DBMS_WORKLOAD_REPLAY.INITIALIZE_REPLAY(replay_name => '<replay_name>', replay_dir => '<CAPTUREDIRstep2>');
SQL> exec DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY();
------From another session--------
$wrc REPLAYDIR=<location of Step 2 dir> USERID=system PASSWORD=xxx
SQL> set pagesize 0 long 30000000 longchunksize 2000
SQL> select dbms_workload_replay.report(replay_id => 1,format => 'TEXT') from dual;
Reference Oracle Doc Id: 1662664.1
Comments
Post a Comment