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

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

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

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

No comments:

Post a Comment

PostgreSQL-Query: Sort result set by specific field values using ORDER BY Clause

Problem: Suppose we have a book_inventory table which has some columns such as id, isbn, title, author, publisher, publish_date, etc.. whe...