问题描述
当我使用mssql测试应用程序时,我总是随机收到此错误,但对如何解决该问题一无所知。
I keep getting this error randomly when I test an application with mssql and don't have an idea of what I can do to correct the issue.
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException:
Connection reset ClientConnectionId:a2fb508d-0e8e-48b0-92ed-2d1f262b4db1 Error Code: 0
我的设置包括
- Eclipselink作为ORM
- sqljdbc v4.1
- sql server 2014
- Java 8
- Eclipselink as the ORM
- sqljdbc v4.1
- sql server 2014
- Java 8
我相信问题可能是sql-server中的一个设置,尽管我没有看到可以纠正的任何内容。该应用程序可以在Postgres和mysql上完美运行,但客户只想使用mssql。
I believe the problem is probably a setting within sql-server though I haven't seen anything that I could correct. The application works perfect on postgres and mysql but the customer only wants to use mssql.
推荐答案
MSFT JDBC驱动程序不调用sp_reset_connection从上一个会话清除的过程。
MSFT JDBC drivers do not call the sp_reset_connection procedure used to cleanup from the previous session.
我认为此错误是由于一些悬而未决的错误正在被其他数据库清除。
I am thinking that this error is coming from something left hanging that is being cleaned up with the other databases.
您将需要在所有连接上运行SQL Profile跟踪,直到发生错误才能查看实际原因。
You will need to run a SQL Profile trace on all the connections until the error occurs to see the actual cause.
更多信息,请参见:
这篇关于如何解决mssql重置连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!