Pages

Wednesday, February 25, 2009

Active Connections in SQL Server

@@CONNECTIONS
Returns the number of connections, or attempted connections, since SQL Server was last started.

Connections are different from users. Applications, for example, can open multiple connections to SQL Server without the user observing the connections.
To display a report containing several SQL Server statistics, including connection attempts, run sp_monitor.

SELECT GETDATE() AS 'Today''s Date and Time',
@@CONNECTIONS AS 'Login Attempts'

No comments: