trace

  • i have enabled trace flag (1222) to capture deadlocks and some how when i run select * from sys.traces - i dont see this trace here. what i see is only the default trace runnig here.

    any reason why i dont see deadlocks trace runing from the sys.traces output?

    thanks any input.

  • Trace flags are completely separate and distinct from SQL Trace.

    SQL Trace (profiler) is what's shown in the sys.traces view. They are traces of events that occur on the server and are created (server-side) using sp_trace_create or (client-side) with the profiler application. An example of a SQL Trace is 2005's default trace

    Traceflags are options that alter the behaviour of the SQL engine. They're enabled either using DBCC TRACEON or by adding -T and the trace flag number as a startup parameter. Active traceflags can be seen using DBCC TRACESTATUS.

    Traceflag 1222 is an example of such a traceflag. It alters the database engine's normal behaviour so that when a deadlock occurs the graph is written into the error log

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thanks for the detail answer. its clear to me, what to expect from sys.traces.

    thanks again,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply