Difference between @@CONNECTIONS and @@MAX_CONNECTIONS in SQL Server


@@MAX_CONNECTIONS: it returns the maximum number of synchronous user connections allowed. SQL Server allowed by default a maximum of 32767 connections. To avoid many connections it can be configured at the server level.
Note: Maximum connections (32767) is dependent on the application and server hardware limits.

@@CONNECTIONS: It returns the number of connection attempt on SQL Server since SQL Server has been started.

SELECT [ConnectionAttempts] = @@CONNECTIONS,
       [MaximumAllowed] = @@MAX_CONNECTIONS


No comments:

Post a Comment

Please do not enter any spam link in the comment box.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...