|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 4:28 PM
Points: 39,
Visits: 229
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 11:37 PM
Points: 17,
Visits: 104
|
|
Great article, looking forward for next step. I had a little problem when running the query - but it was easy to spot where the problem was.
SELECT t.id AS TraceId , path AS TraceFilePath , tcat.name AS EventCategory , tevent.name AS EventClassName , tcolumn.name AS ColumnName FROM sys.traces AS t CROSS APPLY fn_trace_geteventinfo(t.id) AS tdef JOIN sys.trace_events AS tevent ON tdef.eventid = tevent.trace_event_id JOIN sys.trace_categories AS tcat ON tcat.category_id = tevent.category_id JOIN sys.trace_columns AS tcolumn ON tcolumn.trace_column_id = tdef.columnid WHERE t.is_default = 1 --default trace AND t.status= 1 --running ORDER BY TraceFilePath , EventCategory , EventClassName , ColumnName ;
thanks
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 6:28 AM
Points: 1,125,
Visits: 14,511
|
|
A good start to an overview to SQL trace.
It'd be useful if the next one detailed the difference between profiler and server side tracing where one uses rowset and the other file provider (guaranteed to be loss less).
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, February 24, 2011 10:58 AM
Points: 1,
Visits: 2
|
|
Good article. Interested to read the next step. I expect you will include those sp_trace* procedures as well.
A quick question on this, if the server side operation is to just dump the events collected into the client side application like profiler, then how would the server be affected in performance ? Won't that be an issue only at the client side (comparing the client side & server side traces)?
Thanks, Rony
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:21 AM
Points: 2,163,
Visits: 2,148
|
|
| Looking forward to the rest of this series, thanks!
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 4:28 PM
Points: 39,
Visits: 229
|
|
Rony, I'll cover the sp_trace* procs in detail in the next Stairway level, How to Create a SQL Trace Using T-SQL.
With client-side traces, a SQL Trace rowset provider runs on the server to handle returning trace results to the client application. If the client doesn't consume trace data as fast as it is generated, the trace buffers fill on the server and server threads sending event data will wait for free buffers. Consequently, a slow trace consumer can slow down queries and overall server performance. The rowset provider waits up to 20 seconds before dropping trace events.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 1:35 AM
Points: 4,789,
Visits: 1,336
|
|
Good article... Looking forward to read the next part of the series...
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 2:54 AM
Points: 6,
Visits: 127
|
|
sammesel (2/23/2011)
Great article, looking forward for next step. I had a little problem when running the query - but it was easy to spot where the problem was. SELECT t.id AS TraceId , path AS TraceFilePath , tcat.name AS EventCategory , tevent.name AS EventClassName , tcolumn.name AS ColumnName FROM sys.traces AS t CROSS APPLY fn_trace_geteventinfo(t.id) AS tdef JOIN sys.trace_events AS tevent ON tdef.eventid = tevent.trace_event_id JOIN sys.trace_categories AS tcat ON tcat.category_id = tevent.category_id JOIN sys.trace_columns AS tcolumn ON tcolumn.trace_column_id = tdef.columnid WHERE t.is_default = 1 --default trace AND t.status= 1 --running ORDER BY TraceFilePath , EventCategory , EventClassName , ColumnName ;
thanks
Even using this modified code my server will still not parse?
Msg 102, Level 15, State 1, Line 8 Incorrect syntax near '.'.
Seems to be failing at the parameter (t.id) ?
Microsoft SQL Server 2005 - 9.00.3080.00 (X64) Sep 6 2009 09:15:46 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 4:28 PM
Points: 39,
Visits: 229
|
|
The Server-side Tracing stairway is targeted at SQL 2005 and later versions. Since the error message refers to the CROSS APPLY line, I suspect you are either running this on a SQL 2000 server or from a user database in SQL Server 2000 compatibility mode (80).
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 2:54 AM
Points: 6,
Visits: 127
|
|
Hah! You're absolutely correct! The DB is indeed running in (80) compatibility mode 
Thanks for the quick response...
|
|
|
|