April 25, 2012 at 1:35 pm
Hello friends
I am new in SQL Server.
I have a task to monitor user activity on server or database.
so do anyone know any query for that?
Thanks In Advance
April 25, 2012 at 1:42 pm
Adam Machanic wrote a great proc for this. You can read about it on his blog where he did a whole month on monitoring:
April 25, 2012 at 1:55 pm
I need to monitor
What user is currently working on database.
and what they actually do
April 25, 2012 at 2:09 pm
surma.sql (4/25/2012)
I need to monitorWhat user is currently working on database.
and what they actually do
That is still a might broad statement.
April 25, 2012 at 2:50 pm
If what you want to do is monitor SQL issued against the databases and by whom you can use SQL profiler, but run it as a server side trace
---------------------------------------------------------------------
April 26, 2012 at 3:08 am
April 26, 2012 at 4:26 am
Monitoring the server generally means gathering different kinds of performance metrics. SQL Server comes with four tools that allow you to set this up on your own, Performance Monitor, Server-Side Trace, Extended Events, Dynamic Managment Objects (DMO). If you have an enterprise version available, you can use the Performance Data Collector to monitor all the other servers, but it's not very customizable. Performance Monitor is primarily for monitoring the operating system and the SQL Server service. Trace and Extended Events are good for monitoring things occurring internally like queries, errors, deadlocks, etc. The DMOs are a mixed bag, showing you some server metrics, some query metrics and other internals. Finally, for a few things, you'll need to use the old DBCC commands.
Getting these tools set up to gather metrics is not something I'm going to try to describe in a blog post. For details, get a copy of my book on query performance tuning. I lay it all out there.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 26, 2012 at 7:44 am
Thomas Stringer (4/26/2012)
Great information and summary, Grant.
Thanks. I've had a little practice laying out that information though, so it's not that big an accomplishment.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply