@@CONNECTIONS and @@MAX_CONNECTIONS in sql server


How to find number of connection attempts to sql server since last restart

@@CONNECTIONS: Global variable is used for finding this information

Syntax:

Select @@CONNECTIONS

Return Typeàinteger

After Sql server instance is restarted we have these many attempts are made to connect to sql server instance and these attempts are success or failed

And it is non-Deterministic as it may return different results each time they are called with a specific set of input values.

We have another global variable @@MAX_CONNECTIONS and this is used to check how many connections can be done to sql server simultaniously

Syntax:

Select @@MAX_CONNECTIONS

Return Typeàinteger

Simultaniosly users can open 32767 connctions to sql server instance

The actual number of user connections allowed also depends on the version of SQL Server installed and the limitations of your application(s) and hardware

Regards,

Chaitanya,

Webiste : https://mssqlbuzz.wordpress.com/

To Send Mail : mssqlbuzz

Leave a comment

Design a site like this with WordPress.com
Get started