SqlServer 报错  A connection was successfully established

SqlServer 报错 A connection was successfully established

老增 311 2021-06-17

环境:

  • .Net
.NET Core SDKs installed:
  3.1.409 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  • Microsoft.Data.SqlClient: 1.13
  • SQL Server: 10.50.1600.1 (2008 R2 RTM)

问题表现

在通过 .Net 程序连接数据库查询时, 连接超时后断开, 并报如下错误:

Application startup exception: System.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 35 - An internal exception was caught)

---> System.IO.IOException: Unable to write data to the transport connection: Connection reset by peer.

---> System.Net.Sockets.SocketException: Connection reset by peer.

问题原因: 未知

解决方法: 升级到 SP3 (10.50.6000.34)

https://www.microsoft.com/en-us/download/details.aspx?id=44271 下载对应版本的 SP3 安装包, 双击安装, 重启电脑后可以解决。

附:Sql Server 各个版本更新信息

其他信息: