如何解决错误“命名管道提供程序,错误40-无法打开与'SQL Server'的连接"? [英] How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?

查看:517
本文介绍了如何解决错误“命名管道提供程序,错误40-无法打开与'SQL Server'的连接"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法从站点连接到我的数据库.我收到此错误:

I can't seem to connect to my database from a site. I get this error:

命名管道提供程序,错误:40-无法打开与SQL Server的连接

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

我尝试使用本地IP地址以及公共IP地址进行连接.我尝试过:

I tried using the local IP address to connect as well as a public one. I've tried:

  1. 是的,站点可以与服务器通信
  2. 已启用命名管道/TCP.
  3. 允许远程连接.
  4. Windows防火墙已关闭
  5. 在Windows防火墙中为端口1433创建了一个例外.
  6. 启用SQL Server配置管理器中的所有功能.
  1. Yes, the site can communicate with the server
  2. Named pipes/TCP is enabled.
  3. Remote connections are allowed.
  4. Windows Firewall is off
  5. Created an exception for port 1433 in Windows Firewall.
  6. Enabled everything in SQL Server Configuration Manager.

我还能在这里做什么?

推荐答案

解决此问题非常容易:

  1. 转到控制面板.
  2. 搜索服务.
  3. 从搜索结果中打开本地服务"窗口
  4. 重新启动您的MSSQLSERVER服务.

步骤的屏幕截图:

这篇关于如何解决错误“命名管道提供程序,错误40-无法打开与'SQL Server'的连接"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆