Very often develop their own local experience, open several connections after they reported normal access error, this time need to adjust the maximum number of connections sqlserver.
1. The maximum number of connections query
Value_in_use the SELECT
the FROM C sys.configurations
the WHERE c.NAME = 'User Connections';
Default value is: 0, i.e., unlimited.
2. Query the current number of connections
COUNT SELECT (DISTINCT (login_time)) from the sys.sysprocesses
3. Set the maximum number of connections
exec sp_configure 'show advanced options', 1
GO
RECONFIGURE WITH OVERRIDE
GO
exec sp_configure 'user connections', 300
GO
The WITH OVERRIDE RECONFIGURE
GO
After the database settings need to restart to take effect.
---------------------
Author: duanbeibei
Source: CSDN
Original: https: //blog.csdn.net/duanbeibei/article/details/86573840