仅当将 ADO.NET 与 SqlClient 结合使用时,与 SQL Server 2005 的连接非常慢

发布于 2024-07-29 05:10:55 字数 241 浏览 4 评论 0原文

我有一台全新的服务器,装有 Windows 2008 Server 64 位 + SQL Server 2005 标准版 SP3。

当我尝试从同一域(Windows XP、.Net 3.5)中的客户端打开到此服务器的连接时,打开连接大约需要 20 秒。

打开连接后,一切都像往常一样快。

当使用MDAC 2.8连接或ADO.NET OleDb时,完全没有问题。

如何查找连接速度慢的原因?

I have a brand new server with Windows 2008 Server 64 bit + SQL Server 2005 Standard Edition SP3.

When I try to open a connection to this server from a client in the same domain (Windows XP, .Net 3.5), it takes around 20 seconds to open the connection.

After opening the connection, everything is fast as usual.

When using a MDAC 2.8 connection, or ADO.NET OleDb, there is no problem at all.

How can I find the reason for the slow connection?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心意如水 2024-08-05 05:10:55

问题是服务器上运行的防火墙。 我添加了1433端口的例外,问题就消失了。

可能的解释:也许在使用 OLEDB 时,连接会首先尝试名称管道,绕过防火墙规则。

The problem was the firewall running on the server. I added an exception for port 1433 and the problem was gone.

Possible explanation: maybe when using OLEDB the connection tries Name Pipes first, bypassing the firewall rules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文