Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
List of all Security Audit Events from SQL Default Trace
--List all Security Audit Events
SELECT @id = id
FROM sys.traces
WHERE is_default = 1;
SELECT DISTINCT eventid AS 'EventID' ,
name AS 'Event Name'
FROM fn_trace_geteventinfo(@id) GEI
JOIN sys.trace_events TE ON GEI.eventid = TE.trace_event_id
WHERE name LIKE '%Audit%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment