Replay Trace Data
You can start a distributed replay with the Microsoft SQL Server Distributed Replay feature after you have prepared the input trace data. For more information, see Prepare the Input Trace Data.
Use the administration tool replay option to initiate the event replay stage of the distributed replay. This stage consists of two parts: the trace data dispatch and the starting and synchronizing of the distributed replay.
You can replay trace data in one of two sequencing modes: stress mode or synchronization mode. The default behavior is to replay trace data in stress mode. For more information about the event replay stage and sequencing modes, see SQL Server Distributed Replay
The input trace data must be captured in a version of SQL Server that is compatible with Distributed Replay. The input trace data must also be compatible with the target server that you want to replay the trace data against. For more information about version requirements, see Distributed Replay Requirements.
To replay the trace
(Optional) Modify replay configuration settings: If you want to modify the replay configuration settings, such as the sequencing mode and various scaling values, you must modify the <ReplayOptions> element of the XML-based replay configuration file DReplay.exe.replay.config. You can also modify the <OutputOptions> element to specify output settings, such as whether to record the row count. If you modify the replay configuration file, we recommend that you modify a copy rather than the original. To modify settings, follow these steps:
Make a copy of the default replay configuration file, DReplay.exe.replay.config, and rename the new file. The default replay configuration file is located in the administration tool installation folder.
Modify the replay configuration settings in the new configuration file.
When initiating the event replay stage (the next step), use the config_file parameter of the replay option to specify the location of the modified configuration file.
For more information about the replay configuration file, see Configure Distributed Replay.
Initiate the event replay stage: To start the distributed replay, you must run the administration tool with the replay option. For more information, see Replay Option (Distributed Replay Administration Tool).
Open the Windows Command Prompt utility (CMD.exe), and navigate to the installation location of the Distributed Replay administration tool (DReplay.exe).
(Optional) Use the controller parameter, -m, to specify the controller, if the controller service is running on a computer different from the administration tool.
Use the controller_working_directory parameter, -d, to specify where the intermediate file was saved on the controller during the preprocess stage.
(Optional) Use the -o parameter to capture the replay activity in a result trace file on each client.
(Optional) Use the target_server parameter, -s, to specify the instance of SQL Server where the distributed replay clients should replay the trace workload. This parameter is not required if you used the <Server> element to specify the target server in the <ReplayOptions> element of the replay configuration file.
Use the clients parameter, -w, to specify the distributed replay clients that should participate in the replay. List the client computer names, separated by commas. Note: IP addresses are not allowed.
(Optional) Use the config_file parameter, -c, to specify location of the replay configuration file. Use this parameter to point to the new configuration file if you have modified a copy of the default replay configuration file.
(Optional) Use the status_interval parameter, -f, to specify if you want the administration tool to display status messages at a frequency other than 30 seconds.
For example, the following syntax initiates the replay stage on the same computer as the controller service, uses a controller working directory located at c:\WorkingDir, captures the replay activity on each participating client, uses clients client1 and client2 to perform the replay, and obtains the remaining replay configuration settings from a modified replay configuration file located at c:\modifiedreplay.config:
dreplay replay -d c:\WorkingDir -o -w client1,client2 -c c:\modifiedreplay.config
When the distributed replay has finished, the administration tool returns summary information. If you specified the -o option, the replay activity has been saved in result trace files on each client. For more information about the result trace files, see Review the Replay Results.