Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to Server-side Tracing - Step 1 - Overview of Tracing (Stairway Series)


Stairway to Server-side Tracing - Step 1 - Overview of Tracing (Stairway Series)

Author
Message
Dan Guzman-481633
Dan Guzman-481633
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 394
Comments posted to this topic are about the item Stairway to Server-side Tracing - Step 1 - Overview of Tracing (Stairway Series)
sammesel
sammesel
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 150
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
MysteryJimbo
MysteryJimbo
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1572 Visits: 15336
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).
rony.aj
rony.aj
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 5
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
UMG Developer
UMG Developer
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2408 Visits: 2204
Looking forward to the rest of this series, thanks!
Dan Guzman-481633
Dan Guzman-481633
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 394
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.
Anipaul
Anipaul
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6549 Visits: 1407
Good article... Looking forward to read the next part of the series...



phatdogpromos@googlemail.com
phatdogpromos@googlemail.com
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 185
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)
Dan Guzman-481633
Dan Guzman-481633
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 394
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).
phatdogpromos@googlemail.com
phatdogpromos@googlemail.com
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 185
Hah! You're absolutely correct! The DB is indeed running in (80) compatibility mode Pinch

Thanks for the quick response...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search