Auditing SELECT access to a SQL Server table

I need to keep an easily accessible record of user id's and time whenever someone accesses a particular SQL Server 2005 table.   I have used triggers to accomplish this in the past, to record edits, deletes and inserts and write an entry to a log table that I created.   Is there a way to record a SELECT operation?   Basically I need to know WHO is accessing the table and when.    

In my particular situation, I'm not concerned with anyone trying to access the table through a view or stored procedure (but I'd be delighted if I knew how to monitor those operations as well).
BobSacksAsked:
Who is Participating?
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.

gigglickCommented:
There a many vendors who produce software to do this.  Apex and DB Audit are two I can think of off the top of my head.  With those you can view pretty much everything that goes on on the server.
0
BobSacksAuthor Commented:
Yeah... It's a one-time short-term need.   My client is unwilling to purchase anything.   I was hoping that there was an easy way to do this.  
0
gigglickCommented:
The only other possibility I coudl see was to use Profiler and limit your filter to select statements.  I done use Profiler often but the microsoft guide is here: http://solidqualitylearning.com/blogs/dejan/archive/2004/11/25/214.aspx
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

BobSacksAuthor Commented:
That link doesn't work for me.   Does it work for you??
0
Anthony PerkinsCommented:
Tell your client there is no silver bullet, they either pay for the software or pay you.

The best you can accomplish is to limit all access to stored procedures.  You can then log all you need...

0
gigglickCommented:
Sorry...it didn't work for me either...
Here is another article from MS: http://www.microsoft.com/technet/prodtechnol/sql/70/tips/sqlprof.mspx
0

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
BobSacksAuthor Commented:
Not exactly what I was hoping for.. but damned interesting!!!   I've never used the Profiler before.  I'm not sure it will do precisely (and simply) what I want, but I sure do want to play with it!!   Thanks!
0
gigglickCommented:
Welcome!
0
Anthony PerkinsCommented:
>>I'm not sure it will do precisely (and simply) what I want<<
Hate to break it to you, but no, it will not.  SQL Profiler is a dubugging and/or ad hoc monitoring tool not an auditing utility.
0
BobSacksAuthor Commented:
Darn!   Got any other ideas?  
0
Anthony PerkinsCommented:
From my last comment:

"Tell your client there is no silver bullet, they either pay for the software or pay you.

The best you can accomplish is to limit all access to stored procedures.  You can then log all you need..."
0
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.