473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL timing out

I am using C# to connect and extract data from an SQL database. However, on
large databases (>1,000,000 records), I keep getting a time-out error
("Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.") when trying to fill a DataSet
(empty/new). This occurs about 3 minutes into the calculations.

Select Command: "SELECT * FROM db_information WHERE ([Sales Date] <=
CONVERT(DATETIME, '2003-01-31 00:00:00', 102))".

Connect string: "data source=MyServer;initial catalog=MyDataBase;integrated
security=SSPI;persist security info=False;workstation id=Laptop;packet
size=4096;Connect Timeout=3600"

Procedure: "ConnectionCheckForData (CheckforData())."

Source: ".Net SqlClient Data Provider"

The server timeout default is 0, for unlimited.

Any ideas on what is causing the timeout error, and what changes are
necessary to fix?

Thanx,
Allen Feris
The DataSol Group, Inc.
Nov 16 '05 #1
1 2730
Have you tried increasing the command timeout property -
SqlCommand.CommandTimeout().

-Naraen

---
"AFeris" <AF****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I am using C# to connect and extract data from an SQL database. However, on large databases (>1,000,000 records), I keep getting a time-out error
("Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.") when trying to fill a DataSet
(empty/new). This occurs about 3 minutes into the calculations.

Select Command: "SELECT * FROM db_information WHERE ([Sales Date] <=
CONVERT(DATETIME, '2003-01-31 00:00:00', 102))".

Connect string: "data source=MyServer;initial catalog=MyDataBase;integrated security=SSPI;persist security info=False;workstation id=Laptop;packet
size=4096;Connect Timeout=3600"

Procedure: "ConnectionCheckForData (CheckforData())."

Source: ".Net SqlClient Data Provider"

The server timeout default is 0, for unlimited.

Any ideas on what is causing the timeout error, and what changes are
necessary to fix?

Thanx,
Allen Feris
The DataSol Group, Inc.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jj | last post by:
I've got one database server that works fine when transferring large amounts of data, but a new one that has been setup seems to want to timeout or drop the connection after a period of time. I've...
10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
7
by: jamie | last post by:
hey all, I am attempting to do motion control for a final project, but I have a concern.... For motion control, timing is everyting, the better it is, the better it works. Currently I am...
9
by: Amir Ghezelbash | last post by:
Hey every body i had a question i am in process of writing an application, where this application needs to check the database on hourly bases to see if they are any information that are needed...
1
by: Novice | last post by:
Hi all, I'm at my wit's end on trying to insert some timing code into the server side code that parses the hashed data contained in the hidden field being submitted to the server I've tried...
3
by: gregory_may | last post by:
I have an application where I am using a System Thread to capture the screen & Broadcast it to clients. Its "working", but the timing on the background thread gets wildly erratic at times. Some...
2
by: Steven D'Aprano | last post by:
The timeit module is ideal for measuring small code snippets; I want to measure large function objects. Because the timeit module takes the code snippet argument as a string, it is quite handy...
2
by: julie.siebel | last post by:
Google apparently ate my original post to this (grr) so this'll be a bit more vague than the initial post, but...*sigh*. Javascript is not my forte, and I apologize for the acky-ness of the...
3
by: CSharpner | last post by:
Is it just me or is everyone having problems with the MSDN site today? It keeps timing out. http://msdn.microsoft.com I've tried from: Oak Ridge, TN A proxy through our company net via...
0
by: Daniel Fetchinson | last post by:
On 4/15/08, Daniel Fetchinson <fetchinson@googlemail.comwrote: BTW, using the following ###################################################################### # CODE TO TEST BOTH...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.