Solved

Query Timeout Expired

Posted on 2000-03-21
5
620 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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…

707 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