Solved

Query Timeout Expired

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

867 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

23 Experts available now in Live!

Get 1:1 Help Now