1

I have a strange problem - when I am querying SQL table with more than 9000 rows, SQL randomly disconnects with some unrelated error.

1.) What I mean with randomly disconnects: On average it happens approximately on every fourth or fifth query (but not necessary). If I order by some date it is more likely for query to fail, if no order is applied it is less likely for query to fail. In SQL MGMT Studio in the bottom toolbar disconnect icon appears, only few rows are returned (but not all). If I query table with less than 9000 rows or if I limit number of returned rows (with TOP, for example) query doesn't fail.

2.) What I mean with unrelated error:

An error occurred while executing batch. Error message is: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

or

An error occurred while executing batch. Error message is: Internal connection fatal error.

Data is fine (dates are inside the allowed interval). Queries fail not only from SQL MGMT Studio but also from code. In SQL Profiler everything looks fine. SQL server runs on different server inside of a local network, DEV server (from which I execute the queries) is virtualized on my PC (also inside of the same local network).

My coworkers, who are connected to the same database from their own machines are not having any problems.

We are suspecting that something network related on my machine is the problem, but cannot find it.

Thank you in advance!

2

Our admin found out, that the problem is with DNE LightWeight Filter. If this monster is disabled everything works as it is supposed to (no random disconnects with strange errors).

You can disable it if you go to Control Panel / Network and Sharing center / Change addapter settings. Right click on your network device and select Properties. Deselect DNE LightWeight Filter.

Image of network device options window, where you deselect DNE LightWeight Filter

0

Can't give you a definitive answer, but a few things I would check:

  1. Check that there are no errors being reported on the database server itself (check event logs). I think this is unlikely given that you said it worked fine for your co-workers.

  2. Are you using the same driver (same or later version) to connect as your co-workers?

  3. Is there a problem with your underlying network connection? Like you I tend to feel that is the most likely culprit. If there is then you might see evidence of this in the system event log on your (host) machine or for the virtual machine. You could also try the following in a command prompt window ping -l 65500 server where "server" is the name of your database server and see if any packets drop out. If they do then its your network.

1
  • I forwarded your suggestions to our server admins. I will keep you posted. Tnx for help! – Marko Kastelec May 18 '16 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.