--- title: Configure distributed replay titleSuffix: SQL Server Distributed Replay ms.prod: sql ms.prod_service: sql-tools ms.reviewer: "" ms.technology: tools-other ms.topic: conceptual ms.assetid: aee11dde-daad-439b-b594-9f4aeac94335 author: markingmyname ms.author: maghan ms.custom: seo-lt-2019 ms.date: 03/14/2017 --- # Configure Distributed Replay [!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)] The [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Distributed Replay configuration details are specified in XML files on the Distributed Replay controller, clients, and where the administration tool is installed. These files include the following: - [Controller configuration file](#DReplayController) - [Client configuration file](#DReplayClient) - [Preprocess configuration file](#PreprocessConfig) - [Replay configuration file](#ReplayConfig) ## Controller Configuration File: DReplayController.config When the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Distributed Replay controller service starts, it loads the logging level from the controller configuration file, `DReplayController.config`. This file is located in the folder where you installed the Distributed Replay controller service: **\\DReplayController.config** The logging level specified by the controller configuration file includes the following: |Setting|XML Element|Description|Allowed Values|Required| |-------------|-----------------|-----------------|--------------------|--------------| |Logging level|``|Specifies the logging level for the controller service.|`INFORMATION` | `WARNING` | `CRITICAL`|No. By default, the value is `CRITICAL`.| ### Example This example shows a controller configuration file that has been modified to suppress `INFORMATION` and `WARNING` log entries. ``` CRITICAL ``` ## Client Configuration File: DReplayClient.config When the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Distributed Replay client service starts, it loads configuration settings from the client configuration file, `DReplayClient.config`. This file is located on each client, in the folder where you installed the Distributed Replay client service: **\\DReplayClient.config** The settings specified by the client configuration file include the following: |Setting|XML Element|Description|Allowed Values|Required| |-------------|-----------------|-----------------|--------------------|--------------| |Controller|``|Specifies the computer name of the controller. The client will attempt to register with the Distributed Replay environment by contacting the controller.|You can use "`localhost`" or "`.`" to refer to the local computer.|No. By default, the client tries to register with the controller instance that is running locally ("`.`"), if it exists.| |Client working directory|``|Is the local path on the client where the dispatch files are saved.

The files in this directory are overwritten on the next replay.|A full directory name, starting with the drive letter.|No. If no value is specified, the dispatch files will be saved in the same location as the default client configuration file. If a value is specified and that folder does not exist on the client, the client service will not start.| |Client result directory|``|Is the local path on the client where the result trace file from the replay activity (for the client) is saved.

The files in this directory are overwritten on the next replay.|A full directory name, starting with the drive letter.|No. If no value is specified, the result trace file will be saved in the same location as the default client configuration file. If a value is specified and that folder does not exist on the client, the client service will not start.| |Logging level|``|Is the logging level for the client service.|`INFORMATION` | `WARNING` | `CRITICAL`|No. By default, the value is `CRITICAL`.| ### Example This example shows a client configuration file that has been modified to specify that the controller service is running on a different computer, a computer named `Controller1`. The `WorkingDirectory` and `ResultDirectory` elements have been configured to use folders `c:\ClientWorkingDir` and `c:\ResultTraceDir`, respectively. The logging level has been changed from the default value to suppress `INFORMATION` and `WARNING` log entries. ``` Controller1 c:\ClientWorkingDir c:\ResultTraceDir CRITICAL ``` ## Preprocess Configuration File: DReplay.exe.preprocess.config When you use the administration tool to initiate the preprocess stage, the administration tool loads the preprocess settings from the preprocess configuration file, `DReplay.exe.preprocess.config`. Use the default configuration file or use the administration tool **-c** parameter to specify the location of a modified preprocess configuration file. For more information about using the preprocess option of the administration tool, see [Preprocess Option (Distributed Replay Administration Tool)](../../tools/distributed-replay/preprocess-option-distributed-replay-administration-tool.md). The default preprocess configuration file is located in the folder where you installed the administration tool: **\\DReplayAdmin\DReplay.exe.preprocess.config** The preprocess configuration settings are specified in XML elements that are children of the `` element in the preprocess configuration file. These settings include the following: |Setting|XML Element|Description|Allowed Values|Required| |-------------|-----------------|-----------------|--------------------|--------------| |Include system session activities|``|Indicates whether system session activities during the capture will be included during replay.|`Yes` | `No`|No. By default, the value is `No`.| |Maximum idle time|``|Caps the idle time to an absolute number (in seconds).|An integer that is >= -1.

`-1` indicates no change from the original value in the original trace file.

`0` indicates that there is some activity going on at any given point in time.|No. By default, the value is `-1`.| ### Example The default preprocess configuration file: ``` No -1 ``` ## Replay Configuration File: DReplay.exe.replay.config When you use the administration tool to initiate the event replay stage, the administration tool loads the replay settings from the replay configuration file, `DReplay.exe.replay.config`. Use the default configuration file or use the administration tool **-c** parameter to specify the location of a modified replay configuration file. For more information about using the replay option of the administration tool, see [Replay Option (Distributed Replay Administration Tool)](../../tools/distributed-replay/replay-option-distributed-replay-administration-tool.md). The default replay configuration file is located in the folder where you installed the administration tool: **\\DReplayAdmin\DReplay.exe.replay.config** The replay configuration settings are specified in XML elements that are children of the `` and `` elements of the replay configuration file. ### \ Element The settings specified by the replay configuration file in the `` element include the following: |Setting|XML Element|Description|Allowed Values|Required| |-------------|-----------------|-----------------|--------------------|--------------| |Target instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (the test server)|``|Specifies the name of the server and instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to connect to.|*server_name*[\\*instance_name*]

You cannot use "`localhost`" or "`.`" to represent the local host.|No, if the server name is already specified by using the **-s**_target server_ parameter with the **replay** option of the administration tool.| |Sequencing mode|``|Specifies the mode that is used for event scheduling.|`synchronization` | `stress`|No. By default, the value is `stress`.| |Stress scale granularity|``|Specifies whether all connections on the Service Profile Identifier (SPID) should be scaled together (SPID) or independently (Connection) under stress mode.|SPID | Connection|Yes. By default, the value is `SPID`.| |Connect time scale|``|Is used to scale the connect time in stress mode.|An integer between `1` and `100`.|No. By default, the value is `100`.| |Think time scale|``|Is used to scale think time in stress mode.|An integer between `0` and `100`.|No. By default, the value is `100`.| |Use connection pooling|``|Specifies whether connection pooling will be enabled on each Distributed Replay client.|Yes | No|Yes. By default, the value is `Yes`.| |Health monitor interval|``|Indicates how often to run the health monitor (in seconds).

This value is only used in synchronization mode.|Integer >= 1

(`-1` to disable)|No. By default, the value is `60`.| |Query time-out|``|Specifies the query time-out value, in seconds. This value is only effective until the first row has been returned.|Integer >= 1

(`-1` to disable)|No. By default, the value is `3600`.| |Threads per client|``|Specifies the number of replay threads to use for each replay client.|An integer between `1` and `512`.|No. If not specified, Distributed Replay will use a value of `255`.| ### \ Element The settings specified by the replay configuration file in the `` element include the following: |Setting|XML Element|Description|Allowed Values|Required| |-------------|-----------------|-----------------|--------------------|--------------| |Record row count|``|Indicates whether the row count should be recorded for each result set.|`Yes` | `No`|No. By default, the value is `Yes`.| |Record result set|``|Indicates whether the content of all result sets should be recorded.|`Yes` | `No`|No. By default, the value is `No`.| ### Example The default replay configuration file: ``` stress 60 3600 Yes No ``` ### Possible Issue When Running With Synchronization Sequencing Mode You may encounter a symptom in which the replay functionality appears to "stall", or replays events very slowly. This phenomenon can occur if the trace being replayed relies on data and/or events that do not exist in the restored target database. One example is a captured workload that uses WAITFOR, such as in Service Broker's WAITFOR RECEIVE statement. When using the synchronization sequencing mode, batches are replayed serially. If an INSERT occurs against the source database after the database backup, but before the replay capture trace is started, the WAITFOR RECEIVE issued during replay may have to wait the entire duration of the WAITFOR. Events set to be replayed after the WAITFOR RECEIVE will be stalled. This can result in the Batch Requests/sec performance monitor counter for the replay database target dropping to zero until the WAITFOR completes. If you need to use synchronization mode and wish to avoid this behavior, you must do the following: 1. Quiesce the databases that you will be using as the replay targets. 2. Allow all pending activity to complete. 3. Backup the databases and allow backups to complete. 4. Start the distributed replay trace capture and resume the normal workload. ## See Also [Administration Tool Command-line Options (Distributed Replay Utility)](../../tools/distributed-replay/administration-tool-command-line-options-distributed-replay-utility.md) [SQL Server Distributed Replay](../../tools/distributed-replay/sql-server-distributed-replay.md) [SQL Server Distributed Replay Forum](https://social.technet.microsoft.com/Forums/sl/sqldru/) [Using Distributed Replay to Load Test Your SQL Server - Part 2](https://blogs.msdn.com/b/mspfe/archive/2012/11/14/using-distributed-replay-to-load-test-your-sql-server-part-2.aspx) [Using Distributed Replay to Load Test Your SQL Server - Part 1](https://blogs.msdn.com/b/mspfe/archive/2012/11/08/using-distributed-replay-to-load-test-your-sql-server-part-1.aspx)