SQL Server User Access Log

I need to get user access to our SQL Server so that I can track the average and peak concurrency . Is there a hidden table or something that I am missing, do I have this information? As far as I know, the application I'm looking at does not track this at the application level.

I am currently working on SQL Server 2000 , but will move on to SQL Server 2005 soon, so solutions for both are very much appreciated.

+4
source share
2 answers

In SQL Server 2005, navigate to the tree view on the left and select Server (actual server name)> Management> Activity Monitor. Hope this helps.

+6
source
  • on 2000 you can use the sp_who2 or dbo.sysprocesses system table
  • on 2005 look at sys.dm_exec_sessions DMV

Below is an example

 SELECT COUNT(*) AS StatusCount,CASE status WHEN 'Running' THEN 'Running - Currently running one or more requests' WHEN 'Sleeping ' THEN 'Sleeping - Currently running no requests' ELSE 'Dormant – Session is in prelogin state' END status FROM sys.dm_exec_sessions GROUP BY status 
+5
source

Source: https://habr.com/ru/post/1276308/


All Articles