Anyway to create a SQL Server DDL trigger for “SELECT” statements?

前端 未结 6 1115
太阳男子
太阳男子 2020-12-03 18:34

I am dealing with some sensitive Accounting tables and I would like to audit any SELECT statement executed on the table or any views associated with them.

6条回答
  •  误落风尘
    2020-12-03 19:05

    Yes, it is possible by creating an Event Notification on the AUDIT_DATABASE_OBJECT_ACCESS_EVENT event. The cost of doing something like this would be overwhelming though.

    It is much better to use the audit infrastructure, or using custom access wrapper as gbn recommends.

提交回复
热议问题