-2

当我尝试连接到SQL Server时,我在 Visual Studio 中收到以下错误消息:

我收到了这条消息

> A network-related or instance-specific error
>occurred while establishing a connection to SQL Server.
>The server was not found or was not accessible.
>Verify that the instance name is correct and that
>SQL Server is configured to allow remote connections.
>(provider: Shared Memory Provider, error: 40 - Could
>not open a connection to SQL Server)

这发生在我尝试设置 SQL Management Studio 时,但我一如既往地在设置它时遇到问题。现在我不能使用它们中的任何一个。

我该如何解决这个问题?

4

2 回答 2

2

这通常意味着您输入的服务器名称不正确,或者服务器没有运行 SQL Server 服务。检查这两件事。

于 2013-01-04T23:54:06.603 回答
2

这是一个相当普遍的问题。查看 Stack Overflow 上的现有答案,例如,如何修复错误“命名管道提供程序,错误 40 - 无法打开与“SQL Server”的连接?.

于 2013-01-04T23:55:11.630 回答