How do I resolve mssql resetting connections

匆匆过客 提交于 2019-12-11 20:46:16

问题


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

My setup consists of

  1. Eclipselink as the ORM
  2. sqljdbc v4.1
  3. sql server 2014
  4. Java 8

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.


回答1:


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.

You will need to run a SQL Profile trace on all the connections until the error occurs to see the actual cause.

More can be found at : What does "exec sp_reset_connection" mean in Sql Server Profiler?



来源:https://stackoverflow.com/questions/30846459/how-do-i-resolve-mssql-resetting-connections

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