SHARE
TWEET

Xevents ObjectName

SQLSoldier Oct 25th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. With EvtData
  2. As (Select CAST(event_data as XML) as EvtData
  3.     From sys.fn_xe_file_target_read_file (
  4.             'S:\Path\To\File\FileName*.xel', null, null, null))
  5. SELECT EvtData.value('(event/data[@name="object_name"]/value)[1]', 'sysname') AS ObjectName,
  6.         EvtData.value('(event/action[@name="object_name"]/value)[1]', 'sysname') AS ObjectName,
  7.         EvtData
  8. FROM EvtData;
RAW Paste Data
Top