Created
December 5, 2017 01:50
-
-
Save samirbehara-zz/08a4f3fd1570cea4ffd0391f64635bd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @tracefile VARCHAR(256) | |
SELECT @tracefile = CAST(value AS VARCHAR(256)) | |
FROM ::fn_trace_getinfo(DEFAULT) | |
WHERE traceid = 1 | |
AND property = 2 -- filename property | |
SELECT * | |
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