Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 2.13 KB

replay-to-a-cursor-sql-server-profiler.md

File metadata and controls

44 lines (29 loc) · 2.13 KB
title titleSuffix description author ms.author ms.date ms.service ms.subservice ms.topic ms.collection
Replay to a Cursor
SQL Server Profiler
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.
rwestMSFT
randolphwest
03/01/2017
sql
profiler
how-to
data-tools

Replay to a Cursor (SQL Server Profiler)

[!INCLUDE SQL Server Azure SQL Managed Instance]

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.

To replay to the cursor

  1. 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.

  2. In the trace window, click an event.

  3. On the Replay menu, click Run to Cursor, and then connect to the server where you want to replay the trace.

  4. In the Replay Configuration dialog box, verify the settings, and then click OK.

    The replay starts, pausing when the first cursor is reached.

  5. Press F5 to resume the trace.

  6. Repeat Step 5 through the end of the trace.

See Also

Replay to a Breakpoint (SQL Server Profiler)
Replay Traces
SQL Server Profiler