Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 2.56 KB

File metadata and controls

66 lines (52 loc) · 2.56 KB
title @@MAX_CONNECTIONS (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 09/18/2017
ms.prod sql
ms.prod_service sql-database
ms.reviewer
ms.technology t-sql
ms.topic language-reference
f1_keywords
@@MAX_CONNECTIONS
@@MAX_CONNECTIONS_TSQL
dev_langs
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
ms.assetid 57eb9f4b-548f-4212-9684-a11d831c4732
author MikeRayMSFT
ms.author mikeray

@@MAX_CONNECTIONS (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

Returns the maximum number of simultaneous user connections allowed on an instance of [!INCLUDEssNoVersion]. The number returned is not necessarily the number currently configured.

Topic link icon 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