ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize
8 out of 16 rated this helpful - Rate this topic

@@CONNECTIONS

SQL Server 2000

Returns the number of connections, or attempted connections, since Microsoft® SQL Server™ was last started.

Syntax

@@CONNECTIONS

Return Types

integer

Remarks

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.

Examples

This example shows the number of login attempts as of the current date and time.

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

Here is the result set:

Today's Date and Time              Login Attempts
---------------------------        ---------------
1998-04-09 14:28:46.940            18

See Also

Configuration Functions

sp_monitor

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.