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 Friday, October 21, 2011 11:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, December 5, 2012 6:07 AM
Points: 35, Visits: 230
sammesel is right, but this code should be corrected in the article. Please and thank you.
Post #1194582
Posted Friday, October 21, 2011 6:41 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 6:35 AM
Points: 54, Visits: 290
I corrected the script in the article shortly after Sammesel brought this to my attention. As I mentioned in my other response, the other issue is that the script is intended for databases in 90 and later compatibility mode.

Thanks,

Dan
Post #1194745
Posted Saturday, October 22, 2011 8:28 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, December 5, 2012 6:07 AM
Points: 35, Visits: 230
Hi Dan,

First, thanks for the article, it's been very helpful.

I saw your earlier reply regarding the versioning, and I should have been clearer. I was referring to the missing spaces in the FROM section, which should be corrected to:

 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

It's simple to correct, but the original doesn't parse in SSMS as is.

Thanks for the quick response,
Mike
Post #1194802
Posted Saturday, October 22, 2011 1:56 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 6:35 AM
Points: 54, Visits: 290
Thanks for pointing out the missing spaces in the script. The edit tool didn't preserve the original spaces so I added them back. The revision is awaiting appoval.
Post #1194879
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse