Forum Discussion
Auditing failed statements
Hi albourg -- For the select/insert/delete events, SCHEMA_OBJECT_ACCESS_GROUP should capture these events. For schema change audit, SCHEMA_OBJECT_CHANGE_GROUP. For the "statements causing integrity violations", I assume(!?) you are referring to referential integrity violations which could be captured using the STATEMENT_ROLLBACK_GROUP.
I would recommend creating a filter on the server audit for schemas/objects that you do not want to audit (such as the sys schema), otherwise the audit will capture a lot of noise. Lastly, be mindful of possible performance degradation and audit log management. Take care.
- albourgJun 23, 2022Copper Contributor
bake13I didn't find any STATEMENT_ROLLBACK_GROUP in the documentation of sql server 2016.
Do you have a link for a doc?
- bake13Jun 23, 2022
Microsoft
Hi albourg -- Your original post indicated SQL2017, so I'm unsure whether you are using SQL2016 or SQL2017. Regardless, the audit action group is called TRANSACTION_GROUP. Take care.
SQL Server Audit Action Groups and Actions - SQL Server | Microsoft Docs