Skip to content

Latest commit

 

History

History
71 lines (56 loc) · 2.59 KB

File metadata and controls

71 lines (56 loc) · 2.59 KB
title @@MAX_CONNECTIONS (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
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
caps.latest.revision 29
author BYHAM
ms.author rickbyh
manager jhubbard

@@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