@@CONNECTIONS (Transact-SQL)

Syntax

Return Types

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.

@@MAX\_CONNECTIONS is the maximum number of connections allowed simultaneously to the server. @@CONNECTIONS is incremented with each login attempt, therefore @@CONNECTIONS can be greater than @@MAX\_CONNECTIONS.

Examples

The following example shows returning the number of login attempts as of the current date and time.