@@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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: