Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
DECLARE @tracefile VARCHAR(256)
SELECT @tracefile = CAST(value AS VARCHAR(256))
FROM ::fn_trace_getinfo(DEFAULT)
WHERE traceid = 1
AND property = 2 -- filename property
FROM ::fn_trace_gettable(@tracefile, DEFAULT) trc
INNER JOIN sys.trace_events evt ON trc.EventClass = evt.trace_event_id
WHERE trc.EventClass IN (102, 103, 104, 105, 106, 108, 109, 110, 111)
ORDER BY trc.StartTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment