sql-server - [Microsoft][SQL Server 的 ODBC 驱动程序 17

我在应用程序日志中收到以下错误

[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host."

我正在使用 Microsoft SQL Server 2014,对于数据源,我正在使用 ODBC Driver 17 for SQL Server。所有连接检查似乎工作正常,但数据库连接间歇性关闭。任何想法或建议表示赞赏。

最佳答案

我自己也遇到了这个问题,希望能说明一些问题。驱动程序版本:SQL Server 的 ODBC 驱动程序 17。 2017.174.02.01

查看SQL Server日志,发现类似这样的错误:

Log entry:  Error: 17832, Severity: 20, State: 11.
The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: x.x.x.x]

然后我在 MSDocs 站点上找到了这个与 17832 事件 ID 匹配的文档。

https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-17832-database-engine-error?view=sql-server-ver15

它描述了 SQL Server 本身的 MaxTokenSize 设置对于这个特定的登录 token 来说可能太小了。您可以将 MaxTokenSize 设置为更大的值以进行测试,如果这样可以解决问题,您将需要找出实际的 token 大小并将其设置为只有那么大。

关于sql-server - [Microsoft][SQL Server 的 ODBC 驱动程序 17]TCP 提供程序 : An existing connection was forcibly closed by the remote host,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58971070/

相关文章:

amazon-web-services - AWS Cognito 在首次登录时不提示 MFA

php - {YOURLS} 将 "shortening"接口(interface)设为私有(pri

Python - 使用交互式 CLI 过滤列表

c# - 在C#中的rabbit Mq中获取xDeath中队列消息的最大重试次数

node.js - Heroku MERN 栈环境变量

javascript - Vis js - 避免边缘重叠

visual-studio-2019 - InvalidProjectFileException :

firebase - 解析错误 : 'import' and 'export' may appear

python - 为什么 pyautogui 热键不能一直在 mac 上工作?

python - 当 URL 中没有尾部斜杠时,使用 VueJS 单页的 Django 路由会出现意