Compartir a través de


Clase TraceServer

The TraceServer class is a Trace object that represents a new trace on an instance of SQL Server.

Jerarquía de herencia

System.Object
  Microsoft.SqlServer.Management.Trace.TraceReader
    Microsoft.SqlServer.Management.Trace.TraceServer

Espacio de nombres:  Microsoft.SqlServer.Management.Trace
Ensamblado:  Microsoft.SqlServer.ConnectionInfoExtended (en Microsoft.SqlServer.ConnectionInfoExtended.dll)

Sintaxis

'Declaración
<ComVisibleAttribute(False)> _
Public Class TraceServer _
    Inherits TraceReader
'Uso
Dim instance As TraceServer
[ComVisibleAttribute(false)]
public class TraceServer : TraceReader
[ComVisibleAttribute(false)]
public ref class TraceServer : public TraceReader
[<ComVisibleAttribute(false)>]
type TraceServer =  
    class 
        inherit TraceReader 
    end
public class TraceServer extends TraceReader

El tipo TraceServer expone los siguientes miembros.

Constructores

  Nombre Descripción
Método público TraceServer Initializes a new instance of the TraceServer class.

Arriba

Propiedades

  Nombre Descripción
Propiedad pública Depth Gets the depth value for the trace reader. (Se hereda de TraceReader.)
Propiedad pública FieldCount Gets the number of columns in the data. (Se hereda de TraceReader.)
Propiedad pública IsClosed Gets the Boolean property value that specifies whether the trace reader is closed. (Se hereda de TraceReader.)
Propiedad pública Item[Int32] Gets the column specified by the index position. (Se hereda de TraceReader.)
Propiedad pública Item[String] Gets the column with the specified name. (Se hereda de TraceReader.)
Propiedad pública RecordsAffected Gets the number of records of data. (Se hereda de TraceReader.)

Arriba

Métodos

  Nombre Descripción
Método público Close Closes the trace reader. (Se hereda de TraceReader.)
Método público Dispose Deletes the trace reader information. (Se hereda de TraceReader.)
Método público Equals (Se hereda de Object.)
Método protegido Finalize (Se hereda de Object.)
Método público GetBoolean Returns a Boolean value from the record at the specified column position. (Se hereda de TraceReader.)
Método público GetByte Returns a Byte value from the record at the specified column position. (Se hereda de TraceReader.)
Método público GetBytes Gets a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset. (Se hereda de TraceReader.)
Método público GetChar Gets a character value of the specified column. (Se hereda de TraceReader.)
Método público GetChars(Int32, array<Char[], Int32, Int32, Int32) Gets a character array value from the record at the specified column position. (Se hereda de TraceReader.)
Método público GetChars(Int32, Int64, array<Char[], Int32, Int32) Gets a character array value from the record at the specified column position. (Se hereda de TraceReader.)
Método público GetData Returns IDataReader object used when the field points to a remote data structure. (Se hereda de TraceReader.)
Método público GetDataTypeName Gets the data type of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetDateTime Gets a DateTime value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetDecimal Gets a Decimal value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetDouble Gets a floating point value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetFieldType Returns the field type of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetFloat Gets a floating point value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetGuid Gets a Guid system value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetHashCode (Se hereda de Object.)
Método público GetInt16 Gets a small integer value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetInt32 Gets an integer value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetInt64 Gets a long integer value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetName Gets the name of the field at the specified column position. (Se hereda de TraceReader.)
Método público GetOrdinal Gets the ordinal value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetSchemaTable Gets a table that describes the schema. (Se hereda de TraceReader.)
Método público GetStream Gets the stream of data. (Se hereda de TraceReader.)
Método público GetString Gets a String value at the specified column position. (Se hereda de TraceReader.)
Método público GetTimeSpan Gets a TimeSpan value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetType (Se hereda de Object.)
Método público GetValue Gets a value of the data value at the specified column position. (Se hereda de TraceReader.)
Método público GetValues Gets an array of values from the data value at the specified column position. (Se hereda de TraceReader.)
Método público InitializeAsReader Initializes the server as a trace reader.
Método público IsDBNull Specifies whether the specified column is set to null. (Se hereda de TraceReader.)
Método público IsNull Gets a Boolean value that specifies whether value of the data at the specified column position is null. (Se hereda de TraceReader.)
Método protegido MemberwiseClone (Se hereda de Object.)
Método público NextResult Moves to the next result in the trace. (Se hereda de TraceReader.)
Método público Pause Pauses the trace.
Método público Read Reads the trace record. (Se hereda de TraceReader.)
Método público Restart Restarts the trace.
Método público Stop Stops the trace.
Método público ToString (Se hereda de Object.)
Método público TranslateSubclass Translates the sub class. (Se hereda de TraceReader.)

Arriba

Campos

  Nombre Descripción
Campo protegido currentRow Specifies the current row. (Se hereda de TraceReader.)

Arriba

Comentarios

With the TraceServer object you can:

  • Start a new trace.

  • Read a trace.

In addition to the Trace and Replay objects, the trace can be created manually by using Referencia de SQL Server Profiler or by using a set of Transact-SQL stored procedures called Introducción a Seguimiento de SQL.

Ejemplos

Readme_Tracer

Seguridad para subprocesos

Cualquier miembro público static (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Vea también

Referencia

Espacio de nombres Microsoft.SqlServer.Management.Trace

Otros recursos

Marcas de seguimiento (Transact-SQL)

Plantillas y permisos de SQL Server Profiler