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

Default Trace Load of All 5 Files Expand / Collapse
Posted Monday, February 9, 2009 1:10 PM



Group: General Forum Members
Last Login: Yesterday @ 4:10 PM
Points: 13,378, Visits: 33,937
Comments posted to this topic are about the item Default Trace Load of All 5 Files


--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #653167
Posted Wednesday, July 3, 2013 4:23 PM


Group: General Forum Members
Last Login: Friday, September 5, 2014 3:24 PM
Points: 16, Visits: 199
very nice post. i was trying to write something similar to yours but was stuck on how to get the archived trace file locations.

I have few suggestions. i don't think this part is correct

INNER JOIN sys.trace_subclass_values sv
ON tr.eventclass = sv.trace_event_id
-- i think we have to use tr.EventSubClass instead of tr.objectType
AND tr.ObjectType = sv.subclass_value
-- can not join like this, objects can be from any database and sys.objects is local to each database
LEFT JOIN sys.objects o
ON tr.ObjectID = o.OBJECT_ID

-- to overcome the last problem. I created a temp table that has dbname,objectname,objectid and populated this table with all objects from all databases. then joined on dbname and objectid to get objectname
Post #1470262
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse