Skip to content

Instantly share code, notes, and snippets.

Created January 17, 2012 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1626297 to your computer and use it in GitHub Desktop.
Save anonymous/1626297 to your computer and use it in GitHub Desktop.
SELECT MAX(StartTime),
MIN(StartTime)
FROM sys.traces t
CROSS APPLY fn_trace_gettable(REVERSE(SUBSTRING(REVERSE(t.path),
CHARINDEX('\', REVERSE(t.path)),
260)
) + N'log.trc', DEFAULT) f
WHERE t.is_default = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment