sql 2008和VS2010时遇到问题 [英] facing problem when connect sql 2008 and VS2010

查看:103
本文介绍了sql 2008和VS2010时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供程序,错误:40-无法打开与SQL Server的连接)

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

推荐答案

基本上,当您无法连接到SQL Server时,问题可能是:
1)网络问题,
2)SQL Server配置问题.
3)防火墙问题,
4)客户端驱动程序问题,
5)应用程序配置问题.
6)身份验证和登录问题.

Basically, when you failed to connect to your SQL Server, the issue could be:
1) Network issue,
2) SQL Server configuration issue.
3) Firewall issue,
4) Client driver issue,
5) Application configuration issue.
6) Authentication and logon issue.

检查这些
解决SQL连接问题的步骤 [ ^ ]
SQL Server 2005连接性问题疑难解答-第一部分 [对SQL Server 2005中的连接问题进行故障排除-第二部分 [ ^ ]
对SQL Server 2005中的连接问题进行故障排除-第III部分 [ ^ ]

顺便说一句,BTW还会检查这堆中是否有将来的错误.

Check these
Steps to troubleshoot SQL connectivity issues[^]
SQL Server 2005 Connectivity Issue Troubleshoot - Part I[^]
Troubleshoot Connectivity Issue in SQL Server 2005 - Part II[^]
Troubleshoot Connectivity Issue in SQL Server 2005 - Part III[^]

BTW check this bunch also for future errors.


可能的解决方案:

1>检查防火墙是否阻止正在运行SQL Server的端口(默认安装为端口号:1433).

2>转到SQL Server配置管理器,然后在"SQL Native Client 10.0配置"中检查客户端协议".应启用命名管道.

3>如果您的应用程序未连接到数据库,则检查连接字符串是否正确.
Possible Solutions :

1> Check your firewall is not blocking the port ( Port NO : 1433 for default installation) on which SQL Server is running.

2> Go to SQL Server configuration manager and check for Client Protocols in SQL Native Client 10.0 Configuration. Named Pipe should be enabled.

3> If your application is not connecting to your database then check connectionstring is proper.


这篇关于sql 2008和VS2010时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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