| title | Replay a Transact-SQL Script |
|---|---|
| titleSuffix | SQL Server Profiler |
| description | Discover how to use SQL Server Profiler to replay Transact-SQL scripts so that you can compare different possible solutions to a performance problem. |
| ms.service | sql |
| ms.reviewer | |
| ms.subservice | profiler |
| ms.topic | conceptual |
| ms.assetid | 9c0eb222-e6e3-4bc1-a25f-a41e962d361b |
| author | markingmyname |
| ms.author | maghan |
| ms.custom | seo-lt-2019 |
| ms.date | 03/14/2017 |
[!INCLUDE SQL Server]
When you test possible solutions to a performance problem, use [!INCLUDEssSqlProfiler] to replay [!INCLUDEtsql] scripts, and compare performance before and after your changes.
-
On the File menu, point to Open, and then click Script File.
-
Select the [!INCLUDEtsql] script file you want to open. Make sure that the [!INCLUDEtsql] script contains events necessary for replay. For more information, see Replay Requirements.
-
On the Replay menu, click Start, and connect to the server where you want to replay the script.
-
In the Replay Configuration dialog box, verify the settings, and then click OK.