Export (0) Print
Expand All

TraceServer Class

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

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

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

[ComVisibleAttribute(false)]
public class TraceServer : TraceReader

The TraceServer type exposes the following members.

  NameDescription
Public methodTraceServerInitializes a new instance of the TraceServer class.
Top

  NameDescription
Public propertyDepthGets the depth value for the trace reader. (Inherited from TraceReader.)
Public propertyFieldCountGets the number of columns in the data. (Inherited from TraceReader.)
Public propertyIsClosedGets the Boolean property value that specifies whether the trace reader is closed. (Inherited from TraceReader.)
Public propertyItem[Int32]Gets the column specified by the index position. (Inherited from TraceReader.)
Public propertyItem[String]Gets the column with the specified name. (Inherited from TraceReader.)
Public propertyRecordsAffectedGets the number of records of data. (Inherited from TraceReader.)
Top

  NameDescription
Public methodCloseCloses the trace reader. (Inherited from TraceReader.)
Public methodDisposeDeletes the trace reader information. (Inherited from TraceReader.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBooleanReturns a Boolean value from the record at the specified column position. (Inherited from TraceReader.)
Public methodGetByteReturns a Byte value from the record at the specified column position. (Inherited from TraceReader.)
Public methodGetBytesGets a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset. (Inherited from TraceReader.)
Public methodGetCharGets a character value of the specified column. (Inherited from TraceReader.)
Public methodGetChars(Int32, Char[], Int32, Int32, Int32)Gets a character array value from the record at the specified column position. (Inherited from TraceReader.)
Public methodGetChars(Int32, Int64, Char[], Int32, Int32)Gets a character array value from the record at the specified column position. (Inherited from TraceReader.)
Public methodGetDataReturns IDataReader object used when the field points to a remote data structure. (Inherited from TraceReader.)
Public methodGetDataTypeNameGets the data type of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetDateTimeGets a DateTime value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetDecimalGets a Decimal value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetDoubleGets a floating point value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetFieldTypeReturns the field type of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetFloatGets a floating point value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetGuidGets a Guid system value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetInt16Gets a small integer value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetInt32Gets an integer value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetInt64Gets a long integer value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetNameGets the name of the field at the specified column position. (Inherited from TraceReader.)
Public methodGetOrdinalGets the ordinal value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetSchemaTableGets a table that describes the schema. (Inherited from TraceReader.)
Public methodGetStreamGets the stream of data. (Inherited from TraceReader.)
Public methodGetStringGets a String value at the specified column position. (Inherited from TraceReader.)
Public methodGetTimeSpanGets a TimeSpan value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetType (Inherited from Object.)
Public methodGetValueGets a value of the data value at the specified column position. (Inherited from TraceReader.)
Public methodGetValuesGets an array of values from the data value at the specified column position. (Inherited from TraceReader.)
Public methodInitializeAsReaderInitializes the server as a trace reader.
Public methodIsDBNullSpecifies whether the specified column is set to null. (Inherited from TraceReader.)
Public methodIsNullGets a Boolean value that specifies whether value of the data at the specified column position is null. (Inherited from TraceReader.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNextResultMoves to the next result in the trace. (Inherited from TraceReader.)
Public methodPausePauses the trace.
Public methodReadReads the trace record. (Inherited from TraceReader.)
Public methodRestartRestarts the trace.
Public methodStopStops the trace.
Public methodToString (Inherited from Object.)
Public methodTranslateSubclassTranslates the sub class. (Inherited from TraceReader.)
Top

  NameDescription
Protected fieldcurrentRowSpecifies the current row. (Inherited from TraceReader.)
Top

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 Using SQL Server Profiler or by using a set of Transact-SQL stored procedures called SQL Trace.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft