如何解决sql连接错误HResult 0x2, Level 16, State 1 Could not open a connection to SQL Server [2].
来源:互联网 发布:获取数据索引 编辑:程序博客网 时间:2024/06/01 18:50
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
Error: Microsoft SQL Native Client : Login timeout expired.
在使用 sqlcmd试图连接本机数据库的时候出现以上错误,已经检查了以下情况:
1. sqlserver服务已开启
2. sqlserver browser已开启
3. TCP/IP 和 Named Pipes protocol 均开启
4. sql area configuration允许本地和远程连接
5. 防火墙1433端口准许连接
修改设置后已经重启sql服务,仍然得到以上错误
这个时候您需要检查服务端口设置了,默认端口均是0,你需要把默认端口改成可用的值(默认1433 和防火墙设置一致),保存后重启服务,问题解决。
- 如何解决sql连接错误HResult 0x2, Level 16, State 1 Could not open a connection to SQL Server [2].
- Could not open a connection to SQL Server [2]
- Fixed -- Could not open a connection to SQL Server
- SQL2005远程登录失败的检查和解决(Could not open a connection to SQL Server)
- SQL2005远程登录失败的检查和解决(Could not open a connection to SQL Server)
- Named Pipes Provider: Could not open a connection to SQL Server [53]
- Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
- SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection
- SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection
- SQL Server无法以local 登陆问题的解决方法provider: Named Pipes Provider, error: 40 - Could not open a connection
- 解决Linux下JSP连接Orcale的著名错误Java.SQL.Exception The Network Adapter could not establish the connection .
- Could not open a connection to your authentication agent
- Could not open a connection to your authentication agent
- Could not open a connection to your authentication agent.
- Could not open a connection to your authentication agent
- Could not open a connection to your authentication agent
- Could not open a connection to your authentication agent.
- 如何解决sql server2005的“不允许远程连接”错误.(how to resolve the error: "SQL Server does not allow remote connections" for SQL Server2005)
- android intent 大全
- android Acitvity action,flag和category各个参数的说明
- Android数据存储之文件存储
- java回调函数
- 往sqlite中写入图片二进制数据及读取源码 for iphone
- 如何解决sql连接错误HResult 0x2, Level 16, State 1 Could not open a connection to SQL Server [2].
- TR069在家庭网络中的应用
- 在屏幕上准确调整图形尺寸
- 依赖注入那些事儿 <转>
- RichEdit 为插入的图片增加鼠标事件
- DWR3 学习笔记 - 对象传输
- 低调的华丽:从服务器开发的角度认识 asp.net 中的回调技术
- POJ-1961 Period
- 终端pty和TTY介绍及其区别