As the Workload Capture has been explained in the first part of the post, now lets see how to proceed with the rest of the replay activity.
2. Workload processing
Workload processing or analyzer is mainly used to rectify any issues that the Capture has or to prepare for the replay that we are about to perform on the target database.
-- If an error can be prevented, the Workload Analysis report displays available preventive actions that can be implemented before attempting replay.
-- If an error cannot be corrected, the report provides a description of the error so that it can be accounted for during the replay.
Start by the below command.
java -classpath $ORACLE_HOME/jdbc/lib/ojdbc7.jar:$ORACLE_HOME/rdbms/jlib/dbrparser.jar:$ORACLE_HOME/rdbms/jlib/dbranalyzer.jar: oracle.dbreplay.workload.checker.CaptureChecker /home/oracle/RAT_workload jdbc:oracle:thin:@192.168.56.131:1521:susedb12
or if you would like to skip analyzer and just import the AWR data use the below
select DBMS_WORKLOAD_CAPTURE.IMPORT_AWR (capture_id => 1, staging_schema => 'opensuse') FROM DUAL; -- to import exported AWR data from source.
3. Put the database in a state of readiness for replaying the workload and prepare for the replay
4. Start the clients
A complete report of the replay can be obtained by running the following query
2. Workload processing
Workload processing or analyzer is mainly used to rectify any issues that the Capture has or to prepare for the replay that we are about to perform on the target database.
-- If an error can be prevented, the Workload Analysis report displays available preventive actions that can be implemented before attempting replay.
-- If an error cannot be corrected, the report provides a description of the error so that it can be accounted for during the replay.
-- An instance identical to the instance used for the capture should exist - by identical, it should be logically the same. You should also consider setting the system time on the replay machine to be the same as that prior to the capture being run on the original instance to ensure that time sensitive operations (operations that depend on sysdate, etc) replay succeed accurately without issues.
-- So in our case, SH schema and it's objects should be available in the target database with its relevant data.
-- So in our case, SH schema and it's objects should be available in the target database with its relevant data.
Prerequisites
- Java runtime environment (JRE) version 1.5 or above should be present along with ojdbcNN.jar file located in the $ORACLE_HOME/jdbc/lib/ directory -- NN represents the version number
- EXECUTE privileges for the DBMS_WORKLOAD_CAPTURE package
- SELECT_CATALOG role on the target database (to user who performs Replay).
- Workload directory should also contain exported AWR data for the workload capture. -- this is explained in part 1, step 6.
Step 1: Analyze and import the AWR collected from source
Workload Analyzer is composed of two JAR files dbranalyzer.jar & dbrparser.jar located in the $ORACLE_HOME/rdbms/jlib/Start by the below command.
java -classpath $ORACLE_HOME/jdbc/lib/ojdbc7.jar:$ORACLE_HOME/rdbms/jlib/dbrparser.jar:$ORACLE_HOME/rdbms/jlib/dbranalyzer.jar: oracle.dbreplay.workload.checker.CaptureChecker /home/oracle/RAT_workload jdbc:oracle:thin:@192.168.56.131:1521:susedb12
or if you would like to skip analyzer and just import the AWR data use the below
select DBMS_WORKLOAD_CAPTURE.IMPORT_AWR (capture_id => 1, staging_schema => 'opensuse') FROM DUAL; -- to import exported AWR data from source.
Step 2: Preparing for the Replay
1. Preprocess the Workload directory
-- using DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE procedure
2. Find the number of client processes required to start the Replay process
-- wrc utility will be used to find the processes required
3. Put the database in a state of readiness for replaying the workload and prepare for the replay
-- DBMS_WORKLOAD_REPLAY.INITIALIZE_REPLAY and DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY procedures will be used
4. Start the clients
-- wrc utility will be used to start the client
See the implementation section for the commands in action.
3. Workload Replay
Once all the preparations are complete, we can start the Replay on the target database.
-- DBMS_WORKLOAD_REPLAY.START_REPLAY procedure will be used to start the replay.
-- dba_workload_replays view can be used to check the status of the replay.
4. Analysis and reporting
select dbms_workload_replay.report(21,'TEXT') from dual;
Now lets see the practical implementation and later a small note on connection mapping
Practicals starts here
oracle@opensuse:~/RAT_workload> oracle@opensuse:~/RAT_workload> pwd /home/oracle/RAT_workload oracle@opensuse:~/RAT_workload> ls -lrt total 892 drwxr-xr-x 2 oracle oinstall 175 Feb 19 10:23 cap drwxr-xr-x 3 oracle oinstall 19 Feb 19 10:23 capfiles -rw-r--r-- 1 oracle oinstall 912327 Feb 19 10:23 rat_capture1.html oracle@opensuse:~/RAT_workload> echo $ORACLE_HOME /u01/app/oracle/product/12.1/dbhome oracle@opensuse:~/RAT_workload> echo $PATH /home/oracle/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/u01/app/oracle/product/12.1/dbhome/bin:/u01/app/oracle/product/12.1/oggcore_1:/u01/app/oracle/product/12.1/dbhome/bin:/u01/app/oracle/product/12.1/oggcore_1:/u01/app/oracle/product/12.1/dbhome/bin:/u01/app/oracle/product/12.1/oggcore_1 oracle@opensuse:~/RAT_workload> # Step 1 oracle@opensuse:~/RAT_workload> java -classpath $ORACLE_HOME/jdbc/lib/ojdbc7.jar:$ORACLE_HOME/rdbms/jlib/dbrparser.jar:$ORACLE_HOME/rdbms/jlib/dbranalyzer.jar: oracle.dbreplay.workload.checker.CaptureChecker /home/oracle/RAT_workload jdbc:oracle:thin:@192.168.56.131:1521:susedb12 Enter database username: opensuse Enter password: Importing AWR data from directory '/home/oracle/RAT_workload' Capture ID: 61 AWR dbid: 1392077117 Snapshots range: 50 -> 51 AWR import is done! Analysis done! oracle@opensuse:~/RAT_workload> ls -lrt total 900 drwxr-xr-x 3 oracle oinstall 19 Feb 19 10:23 capfiles -rw-r--r-- 1 oracle oinstall 912327 Feb 19 10:23 rat_capture1.html drwxr-xr-x 2 oracle oinstall 195 Feb 19 10:26 cap -rw-r--r-- 1 oracle oinstall 1148 Feb 19 10:27 wcr_cap_analysis.xml -rw-r--r-- 1 oracle oinstall 3881 Feb 19 10:27 wcr_cap_analysis.html oracle@opensuse:~/RAT_workload> sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Fri Feb 19 10:41:30 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> -- Step 2 (1) SQL> -- Create directory object for further activities SQL> create or replace directory RAT_WORKLOAD as '/home/oracle/RAT_workload/'; Directory created. SQL> exec DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE (capture_dir => 'RAT_WORKLOAD'); PL/SQL procedure successfully completed. SQL> ! oracle@opensuse:~/RAT_workload> ls -lrt total 900 drwxr-xr-x 3 oracle oinstall 19 Feb 19 10:23 capfiles -rw-r--r-- 1 oracle oinstall 912327 Feb 19 10:23 rat_capture1.html drwxr-xr-x 2 oracle oinstall 195 Feb 19 10:26 cap -rw-r--r-- 1 oracle oinstall 1148 Feb 19 10:27 wcr_cap_analysis.xml -rw-r--r-- 1 oracle oinstall 3881 Feb 19 10:27 wcr_cap_analysis.html drwxr-xr-x 2 oracle oinstall 268 Feb 19 10:52 pp12.1.0.2.0 oracle@opensuse:~/RAT_workload> # A new directory pp12.1.0.2.0 has been created containing info oracle@opensuse:~/RAT_workload> # Step 2 (2) oracle@opensuse:~/RAT_workload> wrc replaydir=/home/oracle/RAT_workload mode=calibrate Workload Replay Client: Release 12.1.0.2.0 - Production on Fri Feb 19 22:14:27 2016 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Report for Workload in: /home/oracle/RAT_workload ----------------------- Recommendation: Consider using at least 1 clients divided among 1 CPU(s) You will need at least 150 MB of memory per client process. If your machine(s) cannot match that number, consider using more clients. Workload Characteristics: - max concurrency: 40 sessions - total number of sessions: 57 Assumptions: - 1 client process per 50 concurrent sessions - 4 client processes per CPU - 256 KB of memory cache per concurrent session - think time scale = 100 - connect time scale = 100 - synchronization = TRUE oracle@opensuse:~/RAT_workload> exit exit SQL> -- Step 2 (3) SQL> execute DBMS_WORKLOAD_REPLAY.INITIALIZE_REPLAY('test_replay_1', 'RAT_WORKLOAD'); PL/SQL procedure successfully completed. SQL> execute DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY(SYNCHRONIZATION => 'OBJECT_ID'); PL/SQL procedure successfully completed. SQL> ! oracle@opensuse:~/RAT_workload> # Step 2 (4) oracle@opensuse:~/RAT_workload> # Starting 1 client process here. If you would like to start more, do so by starting using another session oracle@opensuse:~/RAT_workload> # This session will be used to monitor until Replay completes. oracle@opensuse:~/RAT_workload> wrc replaydir=/home/oracle/RAT_workload Workload Replay Client: Release 12.1.0.2.0 - Production on Fri Feb 19 22:19:29 2016 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Username:opensuse Password: Wait for the replay to start (22:19:44)
oracle@opensuse:~/RAT_workload> # Step 3. Workload Replay oracle@opensuse:~/RAT_workload> echo $ORACLE_HOME /u01/app/oracle/product/12.1/dbhome oracle@opensuse:~/RAT_workload> echo $ORACLE_SID susedb12 oracle@opensuse:~/RAT_workload> sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Fri Feb 19 22:23:00 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> execute DBMS_WORKLOAD_REPLAY.START_REPLAY; PL/SQL procedure successfully completed. SQL>Meanwhile in the Terminal-1 you can see the progress..
oracle@opensuse:~/RAT_workload> wrc replaydir=/home/oracle/RAT_workload Workload Replay Client: Release 12.1.0.2.0 - Production on Fri Feb 19 22:19:29 2016 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Username:opensuse Password: Wait for the replay to start (22:19:44) Replay client 1 started (22:28:50)You can check the progress in the database using the below.
SQL> select id, name,status from dba_workload_replays; ID NAME STATUS ---------- ------------------------------ ---------------------------------------- 1 test_replay_1 COMPLETED 21 test_replay_1 IN PROGRESS 11 test_replay_2 COMPLETED SQL> select id, name,status from dba_workload_replays; ID NAME STATUS ---------- ------------------------------ ---------------------------------------- 1 test_replay_1 COMPLETED 21 test_replay_1 COMPLETED 11 test_replay_2 COMPLETED SQL> -- I have already run the tests for other combinations and hence the result. SQL> -- We are now interested in ID 21 which is now completed. SQL>
oracle@opensuse:~/RAT_workload> wrc replaydir=/home/oracle/RAT_workload Workload Replay Client: Release 12.1.0.2.0 - Production on Fri Feb 19 22:19:29 2016 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. Username:opensuse Password: Wait for the replay to start (22:19:44) Replay client 1 started (22:28:50) Replay client 1 finished (22:40:36) oracle@opensuse:~/RAT_workload> # We can see the Replay status as finished which took oracle@opensuse:~/RAT_workload> # only 12 minutes against our capture of 39 min 56 sec with 20 minutes regression oracle@opensuse:~/RAT_workload> exit exit SQL> -- Step 4. Analysis and Reporting SQL> set lines 300 SQL> set pagesize 0 long 30000000 longchunksize 1000 SQL> select dbms_workload_replay.report(21,'TEXT') from dual; DB Replay Report for test_replay_1 --------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------- | DB Name | DB Id | Release | RAC | Replay Name | Replay Status | ---------------------------------------------------------------------------- | SUSEDB12 | 2345262617 | 12.1.0.2.0 | NO | test_replay_1 | COMPLETED | ---------------------------------------------------------------------------- Replay Information ---------------------------------------------------------------------------------- | Information | Replay | Capture | ---------------------------------------------------------------------------------- | Name | test_replay_1 | RAT_CAPTURE | ---------------------------------------------------------------------------------- | Status | COMPLETED | COMPLETED | ---------------------------------------------------------------------------------- | Database Name | SUSEDB12 | NONPLUG | ---------------------------------------------------------------------------------- | Database Version | 12.1.0.2.0 | 12.1.0.1.0 | ---------------------------------------------------------------------------------- | Start Time | 19-02-16 16:58:49 | 18-02-16 09:10:29 | ---------------------------------------------------------------------------------- | End Time | 19-02-16 17:07:22 | 18-02-16 09:50:25 | ---------------------------------------------------------------------------------- | Duration | 8 minutes 33 seconds | 39 minutes 56 seconds | ---------------------------------------------------------------------------------- | Directory Object | RAT_WORKLOAD | RAT_WORKLOAD | ---------------------------------------------------------------------------------- | Directory Path | /home/oracle/RAT_workload/ | /home/oracle/RAT_workload/ | ---------------------------------------------------------------------------------- | AWR DB Id | 2345262617 | | ---------------------------------------------------------------------------------- | AWR Begin Snap Id | 82 | | ---------------------------------------------------------------------------------- | AWR End Snap Id | 83 | | ---------------------------------------------------------------------------------- | Replay Schedule Name | | | ---------------------------------------------------------------------------------- Replay Options --------------------------------------------------------- | Option Name | Value | --------------------------------------------------------- | Synchronization | OBJECT_ID | --------------------------------------------------------- | Connect Time | 100% | --------------------------------------------------------- | Think Time | 100% | --------------------------------------------------------- | Think Time Auto Correct | TRUE | --------------------------------------------------------- | Number of WRC Clients | 1 (1 Completed, 0 Running ) | --------------------------------------------------------- Replay Statistics ------------------------------------------------------------------ | Statistic | Replay | Capture | ------------------------------------------------------------------ | DB Time | 4403.231 seconds | 33451.412 seconds | ------------------------------------------------------------------ | Average Active Sessions | 8.58 | 13.96 | ------------------------------------------------------------------ | User calls | 16588 | 16588 | ------------------------------------------------------------------ Replay Divergence Summary ------------------------------------------------------------------- | Divergence Type | Count | % Total | ------------------------------------------------------------------- | Session Failures During Replay | 0 | 0.00 | ------------------------------------------------------------------- | Errors No Longer Seen During Replay | 0 | 0.00 | ------------------------------------------------------------------- | New Errors Seen During Replay | 0 | 0.00 | ------------------------------------------------------------------- | Errors Mutated During Replay | 0 | 0.00 | ------------------------------------------------------------------- | DMLs with Different Number of Rows Modified | 0 | 0.00 | ------------------------------------------------------------------- | SELECTs with Different Number of Rows Fetched | 0 | 0.00 | ------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- Workload Profile Top Events ------------------------------------------------------ | Event | Event Class | % Activity | ------------------------------------------------------ | resmgr:cpu quantum | Scheduler | 77.75 | ------------------------------------------------------ | CPU + Wait for CPU | CPU | 18.22 | ------------------------------------------------------ | read by other session | User I/O | 1.48 | ------------------------------------------------------ | db file parallel read | User I/O | 1.27 | ------------------------------------------------------ | db file sequential read | User I/O | 0.21 | ------------------------------------------------------ Top Service/Module/Action --------------------------------------------------------------------------------------------------- | Service Name | Module Name | % Activity | Action Drilldown | --------------------------------------------------------------------------------------------------- | SYS$USERS | SalesRollupByMonth | 24.36 | -------------------------------- | | | | | | Action Name | % Activity | | | | | | -------------------------------- | | | | | | UNNAMED | 24.36 | | | | | | -------------------------------- | --------------------------------------------------------------------------------------------------- | SYS$USERS | SalesCubeByMonth | 21.82 | -------------------------------- | | | | | | Action Name | % Activity | | | | | | -------------------------------- | | | | | | UNNAMED | 21.82 | | | | | | -------------------------------- | --------------------------------------------------------------------------------------------------- | SYS$USERS | TopSalesWithinQuarter | 15.89 | -------------------------------- | | | | | | Action Name | % Activity | | | | | | -------------------------------- | | | | | | UNNAMED | 15.89 | | | | | | -------------------------------- | --------------------------------------------------------------------------------------------------- | SYS$USERS | SalesMovingAverage | 12.50 | -------------------------------- | | | | | | Action Name | % Activity | | | | | | -------------------------------- | | | | | | UNNAMED | 12.50 | | | | | | -------------------------------- | --------------------------------------------------------------------------------------------------- | SYS$USERS | SalesByQuarterCountry | 6.78 | -------------------------------- | | | | | | Action Name | % Activity | | | | | | -------------------------------- | | | | | | UNNAMED | 6.78 | | | | | | -------------------------------- | --------------------------------------------------------------------------------------------------- Top SQL with Top Events --------------------------------------------------------------------------------------------------- | SQL ID | Planhash | Sampled Number of | % Activity | Event Drilldown | | | | Executions | | | --------------------------------------------------------------------------------------------------- | 6vrsbutr8h1mk | 121580580 | 9 | 1.91 | ------------------------- | | | | | | | Event | % | | | | | | | | | Activity | | | | | | | ------------------------- | | | | | | | resmgr:cp | 1.91 | | | | | | | | u quantum | | | | | | | | ------------------------- | --------------------------------------------------------------------------------------------------- | 5u3nfctgbckmr | 121580580 | 7 | 1.48 | ------------------------- | | | | | | | Event | % | | | | | | | | | Activity | | | | | | | ------------------------- | | | | | | | resmgr:cp | 1.27 | | | | | | | | u quantum | | | | | | | | ------------------------- | | | | | | | CPU + | 0.21 | | | | | | | | Wait for | | | | | | | | | CPU | | | | | | | | ------------------------- | --------------------------------------------------------------------------------------------------- | av4bt2kryg5md | 121580580 | 7 | 1.48 | ------------------------- | | | | | | | Event | % | | | | | | | | | Activity | | | | | | | ------------------------- | | | | | | | resmgr:cp | 1.48 | | | | | | | | u quantum | | | | | | | | ------------------------- | --------------------------------------------------------------------------------------------------- | cw3ytzbdwd7n9 | 121580580 | 6 | 1.27 | ------------------------- | | | | | | | Event | % | | | | | | | | | Activity | | | | | | | ------------------------- | | | | | | | CPU + | 0.64 | | | | | | | | Wait for | | | | | | | | | CPU | | | | | | | | ------------------------- | | | | | | | resmgr:cp | 0.64 | | | | | | | | u quantum | | | | | | | | ------------------------- | --------------------------------------------------------------------------------------------------- | gmq00as592t0q | 1940277083 | 6 | 1.27 | ------------------------- | | | | | | | Event | % | | | | | | | | | Activity | | | | | | | ------------------------- | | | | | | | resmgr:cp | 1.27 | | | | | | | | u quantum | | | | | | | | ------------------------- | --------------------------------------------------------------------------------------------------- Top Sessions with Top Events -------------------------------------------------------------------------------------------------- | Session ID | Session Serial | Username | Program | % Activity | Event Drilldown | -------------------------------------------------------------------------------------------------- | 34 | 61837 | SH | wrc@opensuse.selv | 3.39 | ----------------- | | | | | apc.com (TNS | | | Event | % Act | | | | | | V1-V3) | | | | ivity | | | | | | | | ----------------- | | | | | | | | resmg | 2.97 | | | | | | | | | r:cpu | | | | | | | | | | quant | | | | | | | | | | um | | | | | | | | | ----------------- | | | | | | | | CPU + | 0.42 | | | | | | | | | Wait | | | | | | | | | | for | | | | | | | | | | CPU | | | | | | | | | ----------------- | -------------------------------------------------------------------------------------------------- | 49 | 32961 | SH | wrc@opensuse.selv | 2.97 | ----------------- | | | | | apc.com (TNS | | | Event | % Act | | | | | | V1-V3) | | | | ivity | | | | | | | | ----------------- | | | | | | | | resmg | 1.91 | | | | | | | | | r:cpu | | | | | | | | | | quant | | | | | | | | | | um | | | | | | | | | ----------------- | | | | | | | | CPU + | 1.06 | | | | | | | | | Wait | | | | | | | | | | for | | | | | | | | | | CPU | | | | | | | | | ----------------- | -------------------------------------------------------------------------------------------------- | 270 | 21487 | SH | wrc@opensuse.selv | 2.97 | ----------------- | | | | | apc.com (TNS | | | Event | % Act | | | | | | V1-V3) | | | | ivity | | | | | | | | ----------------- | | | | | | | | resmg | 2.75 | | | | | | | | | r:cpu | | | | | | | | | | quant | | | | | | | | | | um | | | | | | | | | ----------------- | | | | | | | | CPU + | 0.21 | | | | | | | | | Wait | | | | | | | | | | for | | | | | | | | | | CPU | | | | | | | | | ----------------- | -------------------------------------------------------------------------------------------------- | 43 | 50193 | SH | wrc@opensuse.selv | 2.75 | ----------------- | | | | | apc.com (TNS | | | Event | % Act | | | | | | V1-V3) | | | | ivity | | | | | | | | ----------------- | | | | | | | | resmg | 2.75 | | | | | | | | | r:cpu | | | | | | | | | | quant | | | | | | | | | | um | | | | | | | | | ----------------- | -------------------------------------------------------------------------------------------------- | 290 | 11101 | SH | wrc@opensuse.selv | 2.75 | ----------------- | | | | | apc.com (TNS | | | Event | % Act | | | | | | V1-V3) | | | | ivity | | | | | | | | ----------------- | | | | | | | | resmg | 2.33 | | | | | | | | | r:cpu | | | | | | | | | | quant | | | | | | | | | | um | | | | | | | | | ----------------- | | | | | | | | CPU + | 0.42 | | | | | | | | | Wait | | | | | | | | | | for | | | | | | | | | | CPU | | | | | | | | | ----------------- | -------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- Replay Divergence Session Failures By Application -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- Error Divergence By Application -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- By SQL -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- DML Data Divergence By Application -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- By SQL -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- By Divergence magnitude -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- SELECT Data Divergence By Application -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- By Divergence magnitude -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- --------------------------------------------------------------------------------------------------- Replay Clients Alerts -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- Replay Filters -------------------------------------------------- | No data exists for this section of the report. | -------------------------------------------------- End of Report. SQL>
You can see the report which shows we have "resmgr:cpu quantum" wait events. This is due to the Resource manager plan active in the database. You can disable the Resource manager and rerun the Replay to see the increase in performance.
Resource manager can be disabled by the below command
alter system set resource_manager_plan='' scope=both;
Connection Mapping:
What if you would like to perform the Replay activity on a RAC database? What if you would like to reroute some of the connections (DB links, etc) to other targets? Connection mapping can help you out in this case.
Connection mapping can be used as below for a RAC environment and should be done before the Replay activity is performed.
BEGIN DBMS_WORKLOAD_REPLAY.REMAP_CONNECTION( connection_id => 1 ,replay_connection => '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12r1-rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=12r1-rac2-vip)(PORT=1521))(LOAD_BALANCE=YES)(FAILOVER=YES)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=NONPLUG)))' ); END; /This will use the load balancing option of the RAC environment which can be used to scale the exact performance gain one would achieve without actually migrating the database to a RAC database.
Happy Testing!!