0

I am loading 100,000 plus pieces of data, which should take like 30 to 40 minutes to analyze and complete. We use SQL Server 2005. Currently after a specified time (trying to get the minutes it uses), the SQL Server says the connection was reset.

Is there some setting where this can be changed so my queries can run for an hour?

Blorgbeard
  • 101,031
  • 48
  • 228
  • 272
cdub
  • 24,555
  • 57
  • 174
  • 303
  • You would usually get a time-out exception, not a reset connection.. There might be network issues? From where are you running your script? SSMS, a custom program..? – Blorgbeard Jun 11 '12 at 20:57
  • we have it running in a C#/asp.net webpage. Certain users get to import a bunch of files and we create the data tables with a stored procedure – cdub Jun 11 '12 at 21:01

2 Answers2

0

SqlCommand.CommandTimeout property will let you set it in code, however unless you've got clever you could get a webserver timeout as well.

Connection reset could even be your network boys, killing it for no activity.

I'd be looking at reorgansiing this somehow. Like a request to do the work and kick off athread to do it. A status page to see where it's at. When finished provides a link to the result, or somesuch.

Tony Hopkinson
  • 20,172
  • 3
  • 31
  • 39
  • its hard to tell where it occurs. I'm looking at our db server as well as IIS server too. – cdub Jun 11 '12 at 21:19
0

May be your problem is related to Worker Process(w3wp.exe). In web application After some time the worker process will be recycle. So please check this setting of "IIS". you can also reset the the timeout of "Connection Timeout" in web.config or change "CommandTimeout" in code.

Vikash Sinha
  • 193
  • 8