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.

Related Posts

What is the Use of isNaN Function in JavaScript? A Comprehensive Explanation for Effective Input Validation

In the world of JavaScript, input validation is a critical aspect of ensuring that user-provided data is processed correctly. One indispensa...