Change the value of "Maximum number of concurrent connections" about SQL Server 2012
来源:互联网 发布:大连 软件招聘会 编辑:程序博客网 时间:2024/06/06 10:52
默认值:"Maximum number of concurrent connections" 是0
Run "sp_configure 'user connection' query:
sp_configure 'user connection'
关于Maximum number of concurrent connections 的具体设置和测试:
配置:
https://msdn.microsoft.com/zh-cn/library/ms187030.aspx
测试:
http://www.xumenger.com/sqlserver-conn-20160606/
我在操作过程中遇到一个问题,当我把
Maximum number of concurrent connections 改为1后,发现不能通过ssms等方式连接sql,查看日志,报错:
2017-05-08 18:49:51.60 Logon Could not connect because the maximum number of '1' user connections has already been reached.
The system administrator can use sp_configure to increase the maximum value. The connection has been closed. [CLIENT: <local machine>]2017-05-08 18:49:55.79 Logon Error: 17809, Severity: 20, State: 3.
关于这个问题的解决方案:
1. 在SQL Server Configuration服务中,关闭所有相关的sql服务,除了SQL Server, 以为我的机器为例,使用SQL Server 2012
2.右键SQL Server(SQL2012),打开Properties->Startup Parameters, 添加-m
点击ok确认(需重启service)。
对比Startup Parameters :
添加-m之前:
添加-m之后:
此时可以通过sqlcmd启动service
3.打开cmd,
start service:
Net Start <sqlservername> /mSQLCMD
sqlservername就是你的sql service 的名字。
链接instance: (使用sa)
sqlcmd -S. -Usa
然后根据提示输入密码,连接成功。
修改user connections为0:
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE ;
GO
EXEC sp_configure 'user connections', 0 ;
GO
RECONFIGURE;
修改完后退出
stop service:
Net Stop<sqlservername> /mSQLCMD
4.此时user connection的值已经修改成功,重启service后就可以生效。
但此时再次连接,会继续报错:
这是因为刚开始我们修改了Startup Parameters,导致Server模式为single user mode。
这时只要删除掉-m参数在重启服务就可以了。
6.再次通过ssms链接,测试成功。
- Change the value of "Maximum number of concurrent connections" about SQL Server 2012
- The terminal server has exceeded the maximum number of allowed connections
- Increasing the maximum number of tcp/ip connections in linux
- raise number of connections
- About the return value of SetTimer function
- Number of concurrent tasks
- #poj2699 The Maximum Number of Strong Kings
- poj2699 The Maximum Number of Strong Kings
- Steps to change the default location of SQL Server /SQL Server Agent - Error log files
- The terminal server has exceeded the maximum number of allowed clients
- About the edition of Windows Server 2003
- Maximum Number Of Divisors
- We are already in the process of making 6 connections and the number of simultan
- HDU 1492 The number of divisors(约数) about Humble Numbers
- The number of divisors(约数) about Humble Numbers
- hdu1492-The number of divisors(约数) about Humble Numbers
- HDU1492 The number of divisors(约数) about Humble Numbers
- HDU 1492 The number of divisors(约数) about Humble Numbers
- JS深度克隆
- 传感器——MPU6050
- 初探box-decoration-break
- Linux Centos apache 图片不显示解决办法
- Struts Problem Report Struts has detected an unhandled exception:
- Change the value of "Maximum number of concurrent connections" about SQL Server 2012
- Javascript异步编程的4种方法
- Spring MVC项目启动时在容器加载完毕后插入一个定时任务
- 解决web站点中文乱码问题
- 分针网—IT教育: nodeJS新建一个项目及代码详解
- ResourceBundle.getBundle读取资源文件的路径
- android:利用jxl从excel中读取文件
- 推荐一款华为最新的自动化代码检查工具
- for in数组遍历的坑