Replay trace allows you to replay a trace file (.trc) on another environment. For example, if a production workload is currently run out of SQL Server 2008 R2, the trace file for this workload would need to be replayed twice. Once on an environment with the same SQL Server as production, and secondly on an environment with the upgrade target SQL Server version (SQL Server 2016).
Note: This action needs to be performed twice. Once for A’ (SQL Server 2008) and once for B (Target upgrade server).
Note: To perform this action virtual machines or machines must be manually set up to run distributed replay (D-Replay) traces on. Read the blog on how to set up distributed replay controller and clients.
STEP ONE: OPEN REPLAY TRACES
Open the tool and click the hamburger icon on the left side of screen. This will open the left side bar menu. Next, click “Replay Traces” next to the play icon.
STEP TWO: ENTER INPUTS
Note: Dreplay controller machine needs to have permissions to the user account you will be using to remote to execute the “Dcomcnfg setup” below.
- Open command prompt, type dcomcnfg. This will open the Component Services interface.
- Expand folders on navigation pane on the left
- Component Services -> Computers -> My Computer -> DCOM Config -> DReplayController
- Right click on properties of DReplayController
- Security tab: click on the 3 Edit buttons to add the user account.
- SQL server install path – Provide the path to where SQL server is installed. Example: C:\Program Files (x86)\Microsoft SQL Server\120
- Controller machine name – Provide the name of the machine which has been set up as the controller. This is the machine running the Windows service named SQL Server Distributed Replay controller. The Distributed Replay controller orchestrates the actions of the distributed replay clients. There can only be one controller instance in each Distributed Replay environment.
- Client machine names – Provide the name for each client machine. Comma separated machine names i.e. client1, client2. You can have up to 5 client controllers. Client(s) are one or more machines (physical or virtual) running the Windows service named SQL Server Distributed Replay client. The Distributed Replay clients work together to simulate workloads against an instance of SQL Server. There can be one or more clients in each Distributed Replay environment.
- Click Next button.
- Path to trace file – Provide the path to the input trace (.trc) file.
- Path to store replay preprocess output
- If you do not already have the IRF file, provide path to the location which you want to store the IRF file and other pre-process outputs.
- If you already have the IRF file, provide its path.
- Click Next button.
- Trace file name – Provide a trace file name
- Max file size (MB) – Provide the trace file roll over size value. Default is 200MB. The dropdown is also editable to take custom values.
- Path to store replay trace output – Provide the path for the output trace (.trc) file.
- SQL Server instance name – Provide the name of the server you wish to replay traces on.
- Click Start button.
If the inputs are valid, Distributed Replay process will start . Otherwise the fields which are invalid inputs will be highlighted with red, please make sure entered values are accurate and again click “Start”.
You will need to wait until the replay has finished running and see the location you specified. You can monitor the progress of the replay by clicking on the bell icon at the bottom left of the navigation pane.