Guest User

Untitled

a guest
Dec 7th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. DECLARE @tracefile VARCHAR(256)
  2. SELECT @tracefile = CAST(value AS VARCHAR(256))
  3. FROM ::fn_trace_getinfo(DEFAULT)
  4. WHERE traceid = 1
  5. AND property = 2 -- filename property
  6.  
  7. SELECT *
  8. FROM ::fn_trace_gettable(@tracefile, DEFAULT) trc
  9. INNER JOIN sys.trace_events evt ON trc.EventClass = evt.trace_event_id
  10. WHERE trc.EventClass IN (102, 103, 104, 105, 106, 108, 109, 110, 111)
  11. ORDER BY trc.StartTime
Add Comment
Please, Sign In to add comment