Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Stairway to Server-side Tracing - Step 1 - Overview of Tracing (Stairway Series) Expand / Collapse
Author
Message
Posted Monday, February 14, 2011 10:37 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:08 PM
Points: 53, Visits: 278
Comments posted to this topic are about the item Stairway to Server-side Tracing - Step 1 - Overview of Tracing (Stairway Series)
Post #1063673
Posted Wednesday, February 23, 2011 8:34 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 10:49 PM
Points: 17, Visits: 128
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
Post #1068314
Posted Wednesday, February 23, 2011 8:50 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:08 AM
Points: 1,350, Visits: 15,200
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).
Post #1068330
Posted Wednesday, February 23, 2011 11:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, July 24, 2013 7:17 AM
Points: 1, Visits: 3
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
Post #1068438
Posted Wednesday, February 23, 2011 3:19 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:50 AM
Points: 2,163, Visits: 2,184
Looking forward to the rest of this series, thanks!
Post #1068578
Posted Wednesday, February 23, 2011 8:31 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:08 PM
Points: 53, Visits: 278
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.
Post #1068638
Posted Thursday, February 24, 2011 12:06 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, March 20, 2014 7:32 AM
Points: 5,190, Visits: 1,368
Good article... Looking forward to read the next part of the series...


Post #1068688
Posted Thursday, August 04, 2011 2:19 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 26, 2014 12:46 AM
Points: 6, Visits: 173
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)
Post #1154051
Posted Thursday, August 04, 2011 7:02 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:08 PM
Points: 53, Visits: 278
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).


Post #1154194
Posted Thursday, August 04, 2011 7:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 26, 2014 12:46 AM
Points: 6, Visits: 173
Hah! You're absolutely correct! The DB is indeed running in (80) compatibility mode

Thanks for the quick response...
Post #1154220
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse