Capture User activity on DB

How can I check/capture which users are accessing my application database every day in MS SQL
SrivAsked:
Who is Participating?
 
65tdRetiredCommented:
Could also try SQL Profiler from the management studio.

Detailed info on Profiler:
https://msdn.microsoft.com/en-ca/library/ff650699.aspx?f=255&MSPPError=-2147217396
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Best would be do it from the application.  

You can have something on the first form_open that inserts into a log table.

Alterantively on the sql server expand security (assuming MSQL 2008+) there's an audit feature which you can utilize to log database level activities.  More info on that here:  https://technet.microsoft.com/en-us/library/dd392015(v=sql.100).aspx

Nole that if your application is sharing a common user ID the only way to do this is via the application.
0
 
Anthony PerkinsCommented:
It depends on your version/Edition, but you may want to look into SQL Audit.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.