Solved

Query Timeout Expired

Posted on 2000-03-21
5
618 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with a query 3 36
SQL Throw Error 7 31
SQL Distinct Question 3 11
Need some alteration to below mention query 2 10
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

713 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