From: r14edge on 16 Feb 2010 15:15
I'm looking for a way to monitor the number of simultaneous connections
during a day. Is that possible? If yes, how is it possible?
From: jgurgul on 17 Feb 2010 04:20
It depends really what you mean by a connection as to which view you need to
look at, but simple answer is yes.
Is it something that is simple connected to the sql server? or something
that is running a piece of sql etc. (active connections versus idle etc)
All this information is available from management views, you would just need
to collect it periodically and take the maxiumum number in any given time
SELECT * FROM sys.dm_exec_connections
Returns information about the connections established to this instance of
SQL Server and the details of each connection.
SELECT * FROM dm_exec_sessions
Returns one row per authenticated session on SQL Server.
sys.dm_exec_sessions is a server-scope view that shows information about all
active user connections and internal tasks. This information includes client
version, client program name, client login time, login user, current session
setting, and more. Use sys.dm_exec_sessions to first view the current system
load and to identify a session of interest, and then learn more information
about that session by using other dynamic management views or dynamic
SELECT * FROM sys.dm_exec_requests
To execute code that is outside SQL Server (for example, extended stored
procedures and distributed queries), a thread has to execute outside the
control of the non-preemptive scheduler. To do this, a worker switches to
preemptive mode. Time values returned by this dynamic management view do not
include time spent in preemptive mode.
> I'm looking for a way to monitor the number of simultaneous connections
> during a day. Is that possible? If yes, how is it possible?
> Thank you
Prev: unhandled win32
Next: SQL 2005 Saving Stored Procedures and Saving / Implementation