?
Solved

WAITFOR DELAY stored procedure timeout expired on SQL Server 2000

Posted on 2008-10-24
4
Medium Priority
?
1,468 Views
Last Modified: 2013-11-30
Hi all.

I have a stored procedure provided in the code snippet. When I run it in my ActiveXScript in my DTS:

oConn.Execute =  "[SDI].dbo.spDelay '0:1:0'"

While testing it, it works fine when the delay is set to 35 seconds: oConn.Execute =  "[SDI].dbo.spDelay '0:0:35'"

But if I put 50 seconds or a minute as provided above, I get an error:

[Microsoft][ODBC SQL Server Driver] TimeOut Expired

I have gone to server --> Properties --> Connections --> and set Query timeout to 0 seconds but I still get the error.

The ActiveXScript sends emails to records in a table, I want the DTS to pause for a minute or 2 in between emails.
CREATE PROCEDURE spDelay (@interval CHAR(9))
AS
WAITFOR DELAY @interval
GO

Open in new window

0
Comment
Question by:printmedia
[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
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22796677
I would say that your command timeout in your DTS connection string is set too low then.  Double check the commandtimeout of your oconn connection object.
0
 

Author Comment

by:printmedia
ID: 22796888
Ah, I didn't set the timeout, how can I set it to indefinite, as there may be times where there are 100 emails to send out I wouldn't know how long it would take to send them out.
0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 2000 total points
ID: 22797075
oconn.commandtimeout=0
0
 

Author Comment

by:printmedia
ID: 22797272
Great thanks!
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

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 ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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…
Suggested Courses

801 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