TraceReplay 类

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

继承层次结构

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

命名空间:  Microsoft.SqlServer.Management.Trace
程序集:  Microsoft.SqlServer.ConnectionInfoExtended(在 Microsoft.SqlServer.ConnectionInfoExtended.dll 中)

语法

声明
<ComVisibleAttribute(False)> _
Public Class TraceReplay _
    Implements IDisposable
用法
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

TraceReplay 类型公开以下成员。

构造函数

  名称 说明
公共方法 TraceReplay Initializes a new instance of the TraceReplay class.

页首

属性

  名称 说明
公共属性 Connection Gets or sets the connection with an instance of SQL Server.
公共属性 Options Gets or sets the configuration options for replaying the trace.
公共属性 OutputFile Gets or sets the name of an optional file to which trace replay output is streamed.
公共属性 OutputTable Gets or sets the name of an optional table to which trace replay output is streamed.
公共属性 Source Gets or sets the TraceReader object that contains the trace to be replayed.

页首

方法

  名称 说明
公共方法 Dispose Deletes the trace information.
公共方法 Equals (从 Object 继承。)
受保护方法 Finalize Completes the trace replay. (覆盖 Object.Finalize()。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetType (从 Object 继承。)
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法 Pause Pauses the trace replay.
公共方法 Start Starts the trace replay.
公共方法 Stop Stops the trace replay.
公共方法 ToString (从 Object 继承。)

页首

事件

  名称 说明
公共事件 ReplayEvent Invokes the handler before an event is replayed.
公共事件 ReplayPause Invokes the handler before a replayed trace is paused.
公共事件 ReplayResultEvent Invokes the handler before a result is returned from a replayed event.
公共事件 ReplayStart Invokes the handler before a replayed trace is started.
公共事件 ReplayStop Invokes the handler before a replayed trace is stopped.

页首

注释

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 参考 or using a set of Transact-SQL stored procedures called SQL 跟踪简介.

Thread Safety

此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。但不保证所有实例成员都是线程安全的。

示例

Readme_Tracer

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.SqlServer.Management.Trace 命名空间

其他资源

跟踪标志 (Transact-SQL)

SQL Server Profiler 模板和权限