Link to home
Start Free TrialLog in
Avatar of SharonBernal
SharonBernal

asked on

SQL Server Audit Table Select

I'd like to be able to audit when a user selects from a table.

I need to know who accessed it, the table name, the select statement needs to be captured, and what time.

I've looked at sys.dm_exec_query_stats but I am not able to get the user information.

I'm not able to use SQL Profiler and I need an alternative.
ASKER CERTIFIED SOLUTION
Avatar of dsacker
dsacker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Umair Qamar
Umair Qamar

This link might help.

www.mssqltips.com/sqlservertip/1770/auto-generate-sql-server-update-triggers-for-data-auditing/

He describes all the code that how to deal with your requirements.