Compartir a través de


Microsoft.SqlServer.Management.Trace Espacio de nombres

The Microsoft.SqlServer.Management.Trace namespace contains the SQL Server Trace and Replay objects.

The Microsoft.SqlServer.Management.Trace provides an interface for reading trace data from files, tables, or rowsets.

The Trace and Replay objects can do the following:

  • Trace and record events on an instance of SQL Server.

  • Manipulate and analyze trace data.

  • Replay recorded trace events on an instance of SQL Server.

The Microsoft.SqlServer.Management.Trace namespace is in the Microsoft.SqlServerConnectionInfoExtended.dll file.

In addition to the Trace and Replay objects, SQL Server traces can be implemented manually by using Referencia del Analizador de SQL Server, or by using the Introducción a Traza de SQL set of Transact-SQL stored procedures.

[!NOTA]

The Trace and Replay objects are not supported on a 64-bit platform.

Clases

  Clase Descripción
Clase pública ReplayEventArgs The ReplayEventArgs object provides programmatic access to the arguments used to report events that occur when replaying trace on an instance of SQL Server.
Clase pública SqlTraceException The SQLTraceException class represents the general exception raised by the SMO trace objects.
Clase pública SqlTraceFailToInstantiateTypeException The SQLTraceFailToInstantiateTypeException class represents the exception raised when an SMO trace object operation fails to instantiate an object.
Clase pública SqlTraceFailToLoadInstAPIAssemblyException The SQLTraceFailToLoadInstAPIAssemblyException class represents the exception raised by the SMO trace objects when an Inst API assembly fails to load.
Clase pública TraceEventArgs The TraceEventArgs object provides programmatic access to the arguments used to report events that occur when collecting trace from an instance of SQL Server.
Clase pública TraceFile The TraceFile class is a Trace object that represents a trace log file.
Clase pública TraceReader The TraceReader class is an abstract Trace Object class that is used in the construction of the TraceServer class, the TraceTable class, and the TraceFile class.
Clase pública TraceReaderWriter The TraceReaderWriter class is an abstract Trace Objects class that is used in the construction of the TraceTable class and the TraceFile class.
Clase pública TraceReplay The TraceReplay object is a Replay object that represents the replay operation for trace log files and trace tables.
Clase pública TraceReplayOptions The TraceReplayOptions object is a Replay object that represents the configuration settings required when replaying a trace.
Clase pública TraceServer The TraceServer class is a Trace object that represents a new trace on an instance of SQL Server.
Clase pública TraceTable The TraceTable class is a Trace object that represents a table of trace information.

Interfaces

  Interfaz Descripción
Interfaz pública IDataRecordChanger The IDataRecordChanger object is a Trace and Replay object that represents the current record.
Interfaz pública ITraceDataWriter The ITraceDataWriter object provides programmatic access to the data writer for the SQL Trace.

Delegados

  Delegado Descripción
Delegado público ReplayEventHandler Represents the ReplayEventHandler event handler.
Delegado público ReplayPauseHandler Represents the ReplayPauseHandler event handler.
Delegado público ReplayResultEventHandler Represents the ReplayResultEventHandler event handler.
Delegado público ReplayStartHandler Represents the ReplayStartHandler event handler.
Delegado público ReplayStopHandler Represents the ReplayStopHandler event handler.
Delegado público WriteNotifyEventHandler Represents the WriteNotifyEventHandler handler.

Enumeraciones

  Enumeración Descripción
Enumeración pública ReplayMode The ReplayMode enumeration contains values that are used to specify the type of synchronization used during the trace replay.