The maximum number of connections that an instance can accept varies by version.
With the @@MAX_CONNECTIONS function, we can query the number of default maximum connections that the SQL Server version can accept.
With the @@VERSION function, we can query the version of an instance.
1 2 3 4 |
SELECT @@VERSION GO SELECT @@MAX_CONNECTIONS GO |
If we want to change the maximum number of connections that instance will accept, we can set it with sp_configure as follows. You must restart the service after running the following command. Restart operation will cause interruption.
NOTE: If you query @@MAX_CONNECTIONS again after running the following commands, the result will be the same as in the first query. Because @@MAX_CONNECTIONS returns the maximum number of connections that the SQL Server version can accept.
1 2 3 4 5 6 |
sp_configure 'show advanced options',1 RECONFIGURE WITH OVERRIDE GO sp_configure 'user connections',1000 RECONFIGURE WITH OVERRIDE GO |
You can find detailed information about sp_configure in the article “sp_configure (Server-Level Configurations in SQL Server)“
You can learn detail information about the instance with the below query:
1 2 3 4 5 6 7 |
SELECT @@Version as 'SQLServer_Version', SERVERPROPERTY('ServerName') AS 'ServerName \ InstanceName', SERVERPROPERTY('Edition') AS 'Edition', SERVERPROPERTY('ProductVersion') AS 'Version', SERVERPROPERTY('ProductLevel') AS 'SP_Information', SERVERPROPERTY('ResourceLastUpdateDateTime') AS ResourceLastUpdateDateTime', SERVERPROPERTY('ResourceVersion') AS 'ResourceVersion', CASE WHEN SERVERPROPERTY('IsClustered')=1 THEN 'YES' ELSE 'NO' END AS 'IsClustered' |