SQL Server 2000连接错误 - 登录前握手?

时间:2022-01-01 01:55:20

I am developing an ASP.NET application in VS 2010 with a SQL Server 2000 backend (I know, I know . . .)

我正在VS 2010中使用SQL Server 2000后端开发一个ASP.NET应用程序(我知道,我知道......)

I have been working just fine with this setup for the greater part of the last 3 months. However, yesterday I did apply VS 2010 SP1 and now connecting to this database causes the following error:

在过去3个月的大部分时间里,我一直在使用这种设置。但是,昨天我确实应用了VS 2010 SP1,现在连接到此数据库会导致以下错误:

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=72; handshake=44924

连接超时已过期。尝试使用登录前握手确认时超时时间已过。这可能是因为登录前握手失败或服务器无法及时响应。尝试连接到此服务器所花费的时间是 - [Pre-Login] initialization = 72;握手= 44924

Keep in mind that I have made NO changes to either the connection string or the SQL Server 2000 server/database. So there must be a reason why it's happening since the new additions.

请记住,我没有对连接字符串或SQL Server 2000服务器/数据库进行任何更改。所以必须有一个原因,为什么它会在新增加之后发生。

My connection items are fairly vanilla with

我的连接项目相当普通

conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = sqlStatement;
SqlDataReader dr = cmd.ExecuteReader();
resultData.Load(dr);
dr.Close();
conn.Close();

And my connection string looks like

我的连接字符串看起来像

Data Source=192.168.1.200;Persist Security Info=false;Initial Catalog=MyDB;User Id=MyUser;Password=MyPW;Timeout=45;

You can see that I made changes to the timeout but this didn't work. But, again, I shouldn't have to make any changes. I just applied the VS 2010 SP 1 yesterday, that has been the only change. HELP!

您可以看到我对超时进行了更改,但这不起作用。但是,我不应该做任何改变。我昨天刚刚应用了VS 2010 SP 1,这是唯一的变化。帮帮我!

2 个解决方案

#1


6  

I fixed this by opening up port 1433 (SQL) on the server firewall.

我通过在服务器防火墙上打开端口1433(SQL)来修复此问题。

#2


1  

I had the same issue that you have. I solved this issue by allowing connections between the SQL client and SQL host in the firewall. And absolutely, you can grant port 1433 access, which is specifically used for SQL Server.

我遇到了同样的问题。我通过允许SQL客户端和防火墙中的SQL主机之间的连接解决了这个问题。绝对,您可以授予端口1433访问权限,该访问权限专门用于SQL Server。

#1


6  

I fixed this by opening up port 1433 (SQL) on the server firewall.

我通过在服务器防火墙上打开端口1433(SQL)来修复此问题。

#2


1  

I had the same issue that you have. I solved this issue by allowing connections between the SQL client and SQL host in the firewall. And absolutely, you can grant port 1433 access, which is specifically used for SQL Server.

我遇到了同样的问题。我通过允许SQL客户端和防火墙中的SQL主机之间的连接解决了这个问题。绝对,您可以授予端口1433访问权限,该访问权限专门用于SQL Server。