I've created E.E. session to audit logins, but there are many logins that I need to filter out.
I'm wondering, if there is a better option(like creating conf. table with unwanted logins and filter sqlserver.username
using those values) than just adding them one by one via gui\script.
SQL Server 2014 Extended Events – Filtering with Configuration Table
extended-eventssql server 2014
Related Question
- Sql-server – Extended Events filtering
- Sql-server – HOBT vs OBJECT in Extended Event lock_escalation resource_type field
- SQL Server – Best Tool to Process Big .xel Files (Extended Events Logs)
- SQL Server – Error When Using WITH (DROP_EXISTING = ON)
- Sql-server – How to index of filter extended event files in Sql Server
- SQL Server Extended Events – How System Health Extended Events Files Roll Over
Best Answer
Filters along the lines of
sqlserver.username IN (SELECT name FROM sometable)
are not allowed.You can use dynamic SQL to build the filter string and concatenate it to your
CREATE SESSION
statement. Take into account that there's a limit to the length of the list of values. I remember that because I tried the same thing some time ago, but I don't remember what the limit is.