Solved

Query Timeout Expired

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now