Solved

Query Timeout Expired

Posted on 2000-03-21
5
617 Views
Last Modified: 2008-03-17
I have SQL 7.0.  When I run a query which takes longer than a minute it gives an error saying query timeout expired.  Does anyone know how to increase this time limit of one minute.
0
Comment
Question by:mchopda
5 Comments
 
LVL 7

Accepted Solution

by:
simonsabin earned 30 total points
ID: 2640247
If you are using ADO there is a commandtimeout property on the connection object which determines the timeout for the query. It is in seconds and the default is 30. Just increase it.

From a user perspective I would question any query taking longer than say 10s. What are you doing in the query?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2640542
If you want to wait with no limit, set the timeout property even to 0 (wait indefinitely), but i agree with simonsabin: are you sure that the query cannot be optimized in some way?
0
 
LVL 3

Expert Comment

by:ahoor
ID: 2640647
Timeouts are usually set at the client tool (application).

I do not necessary agree with the above 2, some queries just take long...
depends of course if you use them on a user front end or in a report...
so look in the application for the current setting.
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2640684
Ado will is client side.

I only said I question the time. I know there are certain things that take a long time.
0
 

Author Comment

by:mchopda
ID: 2643073
The reason the query is taking so long is b'coz  i have a temporary table from which data needs to be updated and it has to make sure that it does not duplicate.  Also a unique record is made up of 5 fields and hence it is taking so long.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS Deployment problem 5 64
Where is the Help Section? 8 25
SQLCMD Output to file from xpcmd_shell 6 15
SQL View / Qtry 3 10
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question