Table of Contents

Class ServerWideConfigurationSchema.Trace

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.traces (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

The sys.traces catalog view contains the current running traces on the system. This view is intended as a replacement for the fn_trace_getinfo function.
For a complete list of supported trace events, see SQL Server Event Class Reference.

important


This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use Extended Event catalog views instead.


See sys.traces.

[Table(Schema = "sys", Name = "traces", IsView = true)]
public class ServerWideConfigurationSchema.Trace
Inheritance
ServerWideConfigurationSchema.Trace
Extension Methods

Properties

BufferCount

Number of in-memory buffers used by the trace.

[Column("buffer_count")]
[Nullable]
public int? BufferCount { get; set; }

Property Value

int?

BufferSize

Size of each buffer (KB).

[Column("buffer_size")]
[Nullable]
public int? BufferSize { get; set; }

Property Value

int?

DroppedEventCount

Total number of events dropped.

[Column("dropped_event_count")]
[Nullable]
public int? DroppedEventCount { get; set; }

Property Value

int?

EventCount

Total number of events that occurred.

[Column("event_count")]
[Nullable]
public long? EventCount { get; set; }

Property Value

long?

FilePosition

Last trace file position. This value is null when the trace is a rowset trace.

[Column("file_position")]
[Nullable]
public long? FilePosition { get; set; }

Property Value

long?

ID

Trace ID.

[Column("id")]
[NotNull]
public int ID { get; set; }

Property Value

int

IsDefault

1 = default trace.

[Column("is_default")]
[Nullable]
public bool? IsDefault { get; set; }

Property Value

bool?

IsRollover

1 = rollover option is enabled.

[Column("is_rollover")]
[Nullable]
public bool? IsRollover { get; set; }

Property Value

bool?

IsRowset

1 = rowset trace.

[Column("is_rowset")]
[Nullable]
public bool? IsRowset { get; set; }

Property Value

bool?

IsShutdown

1 = shutdown option is enabled.

[Column("is_shutdown")]
[Nullable]
public bool? IsShutdown { get; set; }

Property Value

bool?

LastEventTime

Time the last event fired.

[Column("last_event_time")]
[Nullable]
public DateTime? LastEventTime { get; set; }

Property Value

DateTime?

MaxFiles

Maximum number of rollover files. This value is null if the Max number is not set.

[Column("max_files")]
[Nullable]
public int? MaxFiles { get; set; }

Property Value

int?

MaxSize

Maximum trace file size limit in megabytes (MB). This value is null when the trace is a rowset trace.

[Column("max_size")]
[Nullable]
public long? MaxSize { get; set; }

Property Value

long?

Path

Path of the trace file. This value is null when the trace is a rowset trace.

[Column("path")]
[Nullable]
public string? Path { get; set; }

Property Value

string

ReaderSpid

Rowset trace reader session ID. This value is null when the trace is a file trace.

[Column("reader_spid")]
[Nullable]
public int? ReaderSpid { get; set; }

Property Value

int?

StartTime

Trace start time.

[Column("start_time")]
[Nullable]
public DateTime? StartTime { get; set; }

Property Value

DateTime?

Status

Trace status:

0 = stopped

1 = running

[Column("status")]
[NotNull]
public int Status { get; set; }

Property Value

int

StopTime

Time to stop the running trace.

[Column("stop_time")]
[Nullable]
public DateTime? StopTime { get; set; }

Property Value

DateTime?