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.
SharonBernalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dsackerContract ERP Admin/ConsultantCommented:
If you are at SQL 2008 or greater, you can turn on the Audit feature. Keep in mind this is only supported by Enterprise and Developer versions.

In the Security folder, choose New Audit. Give it a name. Give it some file path. You'll enable it, choose the audit action (i.e., SELECT), etc. It's fairly easy to walk through the required parameters.

You can also query straight from the audit file. It's worth reading up on.

If you are on some other version than Enterprise or Developer, you may have to go with a 3rd-party solution (i.e., ApexSQL Audit, Idera, etc).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Umair QamarCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.