Very slow connection to SQL Server 2005 only if using ADO.NET with SqlClient

怎甘沉沦 提交于 2019-12-12 10:26:41

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1178931/very-slow-connection-to-sql-server-2005-only-if-using-ado-net-with-sqlclient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!