Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 2.4 KB

File metadata and controls

63 lines (49 loc) · 2.4 KB
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
@@MAX_CONNECTIONS
@@MAX_CONNECTIONS_TSQL
helpviewer_keywords
simultaneous connections [SQL Server]
maximum number of simultaneous user connections
@@MAX_CONNECTIONS function
connections [SQL Server], simultaneous
number of simultaneous user connections
dev_langs
TSQL

@@MAX_CONNECTIONS (Transact-SQL)

[!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

Syntax

@@MAX_CONNECTIONS  

Return Types

integer

Remarks

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.

Examples

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            

See Also

sp_configure
Configuration Functions
Configure the user connections Server Configuration Option