question

thennarasu avatar image
thennarasu asked

CREATE TRACE for ONLY DML COMMANDS

how to enable trace for only DML statements which was executrd by only the sysadmin users
sql-server-2008sql-server-2005sql-server-2012sql server 2012
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JohnM avatar image
JohnM answered
Your best bet it is to use audits to capture DML statements. Keep in mind however, that sysadmins can turn them off essentially circumventing the auditing. Reference: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-database-engine You could put the audit files onto a share that SQL Server has permissions to but the sysadmins do not. Hope that helps!
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.