| title | @@MAX_CONNECTIONS (Transact-SQL) | |||||
|---|---|---|---|---|---|---|
| description | @@MAX_CONNECTIONS (Transact-SQL) | |||||
| author | markingmyname | |||||
| ms.author | maghan | |||||
| ms.date | 09/18/2017 | |||||
| ms.service | sql | |||||
| ms.subservice | t-sql | |||||
| ms.topic | reference | |||||
| f1_keywords |
|
|||||
| helpviewer_keywords |
|
|||||
| dev_langs |
|
[!INCLUDE SQL Server Azure SQL Managed Instance]
Returns the maximum number of simultaneous user connections allowed on an instance of [!INCLUDEssNoVersion]. The number returned is not necessarily the number currently configured.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
@@MAX_CONNECTIONS
integer
The actual number of user connections allowed also depends on the version of [!INCLUDEssNoVersion] that is installed and the limitations of your applications and hardware.
To reconfigure [!INCLUDEssNoVersion] for fewer connections, use sp_configure.
The following example shows returning the maximum number of user connections on an instance of [!INCLUDEssNoVersion]. The example assumes that [!INCLUDEssNoVersion] has not been reconfigured for fewer user connections.
SELECT @@MAX_CONNECTIONS AS 'Max Connections'; [!INCLUDEssResult]
Max Connections
---------------
32767
sp_configure
Configuration Functions
Configure the user connections Server Configuration Option