Statistics based on SP_Who results | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Statistics based on SP_Who results

If a scheduled job saves the result of sp_who into a table, then what is the best query criteria to find out how many user connection were to a specific database during a specific time? What are the meaning of "running", "sleeping", and "background"? Is it good idea to go based on hostname? Totally, is this a good approach? CanadaDBA
Runnig: User is executing something on database.
Sleeping: User is conect to database but in that moment is running nothing. Like a screen to put some data, but not yet executing. Tipical case: User went to lunch.
Background: Example, Task Mananger run in background. No on line interface. How about profiler, with Audit login, logout , etc? Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
Thanks Luis, I have to start working and learning Profiler. That’s why I didn’t use it. Until then I created a table with sp_who data which was collected every 5 minutes. Now, I am trying to do some queries and get correct statistics.
quote:Originally posted by LuisMartin Runnig: User is executing something on database.
Sleeping: User is conect to database but in that moment is running nothing. Like a screen to put some data, but not yet executing. Tipical case: User went to lunch.
Background: Example, Task Mananger run in background. No on line interface. How about profiler, with Audit login, logout , etc? Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.

CanadaDBA
]]>