| title | Replay to a Cursor |
|---|---|
| titleSuffix | SQL Server Profiler |
| description | Discover how to use a cursor in SQL Server Profiler to pause a trace replay at a specific point. Make debugging easier by replaying to a cursor. |
| ms.prod | sql |
| ms.prod_service | sql-tools |
| ms.reviewer | |
| ms.technology | profiler |
| ms.topic | conceptual |
| ms.assetid | 89eadc41-4424-4a1c-ba61-0b52c851cdb1 |
| author | markingmyname |
| ms.author | maghan |
| ms.custom | seo-lt-2019 |
| ms.date | 03/01/2017 |
[!INCLUDE SQL Server]
This topic describes how to replay trace files or tables that pause when a cursor is reached by using [!INCLUDEssSqlProfiler]. Pausing traces at cursors supports debugging because you can break the replay of long trace scripts into short segments that can be analyzed incrementally.
-
Open the trace file or trace table you want to replay. For more information, see Open a Trace File (SQL Server Profiler) or Open a Trace Table (SQL Server Profiler).
Make sure that the trace file or table you open contains the event classes necessary for replay. For more information, see Replay Requirements.
-
In the trace window, click an event.
-
On the Replay menu, click Run to Cursor, and then connect to the server where you want to replay the trace.
-
In the Replay Configuration dialog box, verify the settings, and then click OK.
The replay starts, pausing when the first cursor is reached.
-
Press F5 to resume the trace.
-
Repeat Step 5 through the end of the trace.
Replay to a Breakpoint (SQL Server Profiler)
Replay Traces
SQL Server Profiler