Share via


TraceReplay Class

The TraceReplay object is a Replay object that represents the replay operation for trace log files and trace tables.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.Trace.TraceReplay

Namespace:  Microsoft.SqlServer.Management.Trace
Assembly:  Microsoft.SqlServer.ConnectionInfoExtended (in Microsoft.SqlServer.ConnectionInfoExtended.dll)

Syntax

'Declaration
<ComVisibleAttribute(False)> _
Public Class TraceReplay _
    Implements IDisposable
'Usage
Dim instance As TraceReplay
[ComVisibleAttribute(false)]
public class TraceReplay : IDisposable
[ComVisibleAttribute(false)]
public ref class TraceReplay : IDisposable
[<ComVisibleAttribute(false)>]
type TraceReplay =  
    class 
        interface IDisposable 
    end
public class TraceReplay implements IDisposable

The TraceReplay type exposes the following members.

Constructors

  Name Description
Public method TraceReplay Initializes a new instance of the TraceReplay class.

Top

Properties

  Name Description
Public property Connection Gets or sets the connection with an instance of SQL Server.
Public property Options Gets or sets the configuration options for replaying the trace.
Public property OutputFile Gets or sets the name of an optional file to which trace replay output is streamed.
Public property OutputTable Gets or sets the name of an optional table to which trace replay output is streamed.
Public property Source Gets or sets the TraceReader object that contains the trace to be replayed.

Top

Methods

  Name Description
Public method Dispose Deletes the trace information.
Public method Equals (Inherited from Object.)
Protected method Finalize Completes the trace replay. (Overrides Object.Finalize().)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Pause Pauses the trace replay.
Public method Start Starts the trace replay.
Public method Stop Stops the trace replay.
Public method ToString (Inherited from Object.)

Top

Events

  Name Description
Public event ReplayEvent Invokes the handler before an event is replayed.
Public event ReplayPause Invokes the handler before a replayed trace is paused.
Public event ReplayResultEvent Invokes the handler before a result is returned from a replayed event.
Public event ReplayStart Invokes the handler before a replayed trace is started.
Public event ReplayStop Invokes the handler before a replayed trace is stopped.

Top

Remarks

With the TraceReplay object you can:

  • Replay events a from a trace log file or trace table.

  • Modify trace data as it is replayed.

In addition to the Trace and Replay objects, the trace log file can be accessed manually with SQL Server Profiler Reference or using a set of Transact-SQL stored procedures called Introducing SQL Trace.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Examples

Readme_Tracer

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Management.Trace Namespace

Other Resources

Trace Flags (Transact-SQL)

SQL Server Profiler Templates and Permissions