DEA 2.0 – Configure Replay environment


Database Experimentation Assistant utilizes the Distributed Replay tools from the SQL Server installation. We recommend doing a test run with a small trace file before doing a full fledged replay to ensure proper replay of queries.

Setup a virtual network or domain

Distributed replay requires usage of common accounts between machines. For this and security reasons, we recommend running under a virtual network or a domain controlled network.

  1. Create a Controller machine and Client machine(s) in the environment.
  2. Ensure that Controller and Client machine(s) can ping each other over the network.
  3. Distributed Replay client machines must have connectivity to the replay target SQL server.

Setup Controller service

  1. Install Distributed Replay Controller using the SQL Server installer.
  2. In case you missed the SQL Server Installer wizard step to configure the Distributed Replay Controller, configure it through the configuration file. For a typical installation, it can be found at C:\Program Files (x86)\Microsoft SQL Server\<version>\Tools\DReplayController\DReplayController.config
  3. Distributed Replay Controller logs are present at C:\Program Files (x86)\Microsoft SQL Server\<version>\Tools\DReplayController\Log.
  4. Open Services.msc and navigate to the "SQL Server Distributed Replay Controller" service.
  5. Right click on the service > Click Properties > Set the service account to an account that is common to the Controller and Client machines within the network.
  6. Click OK to close the Properties window.
  7. Restart the service SQL Server Distributed Replay Controller service from Services.msc or run from the command prompt, the following commands:
    1. NET STOP "SQL Server Distributed Replay Controller"
    2. NET START "SQL Server Distributed Replay Controller"
  8. For any additional configuration options, see SQL Server Distributed Replay.

DCOM Configuration

This configuration is required only on the Controller machine.

  1. Open dcomcnfg.exe.
  2. Expand Component Services > Computers > My Computer > DCOM Config
  3. Find DReplayController under DCOM Config. Right-click and open its Properties.
  4. Click on the Security tab.
  5. Under Launch and Activation Permissions, select Customize and click Edit.
  6. Add the user that will be starting the replay and give the user Local Launch and Local Activation permissions. If the user plans to launch or activate remotely, give the user Remote Launch and Remote Activation permissions also.
  7. Click OK to commit the changes and go back to the Security tab on the Properties window.
  8. Under Access Permissions, select Customize and click Edit.
  9. Add the user that will be starting the replay and give the user Local Access permission. If the user plans to access the Controller service remotely, give the user Remote Access permission also.
  10. Click OK to commit the changes and back to the Security tab on the Properties window.
  11. Click OK to commit the changes.
  12. Restart the service SQL Server Distributed Replay Controller from Services.msc or run from the command prompt, the following commands:
    1. NET STOP "SQL Server Distributed Replay Controller"
    2. NET START "SQL Server Distributed Replay Controller"

Setup Client service

Before performing this step, verify that the Controller and Client machines can see each other using networking tools such as ping.

  1. Install Distributed Replay Client using the SQL Server installer.
  2. Open Services.msc and navigate to the service SQL Server Distributed Replay Client.
  3. Right click on the service > Click Properties > Set the service account to an account that is common to the Controller and Client machines within the network.
  4. Click OK to close the Properties window.
  5. In case you missed the SQL Server Installer wizard step to configure the Distributed Replay Client, configure it through the configuration file. For a typical installation, it can be found at C:\Program Files (x86)\Microsoft SQL Server\<version>\Tools\DReplayClient\DReplayClient.config
  6. Ensure that the DReplayClient.config contains the name of the Controller machine as its controller for registration.
  7. Restart the service SQL Server Distributed Replay Client from Services.msc or run from the command prompt, the following commands:
    1. NET STOP "SQL Server Distributed Replay Client"
    2. NET START "SQL Server Distributed Replay Client"
  8. Distributed Replay Controller logs are present at C:\Program Files (x86)\Microsoft SQL Server\<version>\Tools\DReplayClient\Log. The log will indicate whether the client is able to register itself with the controller.
  9. If the configuration is successful, the log will show the message, “Registered with controller <controller name>”.
  10. For any additional configuration options, see SQL Server Distributed Replay.

Setup Distributed Replay Administration tools

DReplay administration tool will allow you to quickly test whether Distributed Replay is functioning properly in the environment, especially an environment in which multiple Client machines are registered with a Controller. SQL Server Management Studio may need to be installed to get the administration tool.

  1. Go to the SSMS install location and look for the Distributed Replay administration tools, namely dreplay.exe and its dependent components.
  2. Open a command prompt, and run dreplay.exe status -f 1
  3. If all the previous steps are successful, the console output will indicate that the Controller is able to see its Clients in READY state.

Firewall configuration for Remote Distributed Replay access

Remotely accessing Distributed Replay requires opening ports that are visible within the domain or virtual network.

  1. Open the Windows Firewall with Advanced Security
  2. Navigate to Inbound Rules.
  3. Create a new inbound firewall rule for program C:\Program Files (x86)\Microsoft SQL Server\<version>\Tools\DReplayController\DReplayController.exe.
  4. Allow Domain level access to all ports for DReplayController.exe to be able to communicate with the Controller service remotely.
  5. Save the rule.

Setting up Target SQL Servers

Two Replays are required for performing an A/B test or an experiment. That is, you may need two separate instances of SQL Server installations for a migration scenario.

Installing the two versions of SQL Server instances, respectively, on the same machine will also work. One caveat though is to make sure that the instances are isolated completely when a Replay is in progress.

The following steps must be performed for each Replay.

  1. Restore the back up of the database.
  2. Provide permission to the Client service account user to access the databases under the SQL Server instance. This is required for the queries to be executed on the SQL Server instance.
  3. Start the replay!
Comments (0)

Skip to main content