473,595 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL server job timeouts?

Subject: SQL server job timeouts?

We have a job that uses WinHTTP inside a stored procedure. We have
another SP wrapper that runs this for a couple hundred records.

When we add this as a job using SQLAgent it times out half way. Running
it from SQL Query analyser and it completes to the end.

Anyway to set the timeouts for jobs?

Jul 23 '05 #1
5 8819
(wa****@gmail.c om) writes:
Subject: SQL server job timeouts?

We have a job that uses WinHTTP inside a stored procedure. We have
another SP wrapper that runs this for a couple hundred records.

When we add this as a job using SQLAgent it times out half way. Running
it from SQL Query analyser and it completes to the end.

Anyway to set the timeouts for jobs?


Exactly which component bitches about the timeout? It should not really
be SQL Server Agent, as a job could run for a long time. WinHTTP is a
complete unknown to me.

Could you explain the exact message you get? Don't forget to expand Job
History, and look at the output from the individual job steps.

One possible workaround, is that you can set up a retry interval and a
retry count for the job step, so if fails half-way, it could get a
second change to do the rest.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
I removed the job so I don't have the failure history. I will check up
on that.

Basically WinHTTP / XMLServerHTTP or whatever posts HTTP to the credit
card processor.

I have say 100 records a day, for each record (using a cursor) it
calls a sub storedprocedure that process that transaction.

Now the overall stored procedure (the one with the cursor) can take
quite a while to process as its doing a large number of HTTP requests
serially. eg 5 minutes.
One possible workaround, is that you can set up a retry interval and a


I thought of that workaround thanks, just wondered if there was a more
elegant way.

If I run it through SQL query analyser it works fine.

Jul 23 '05 #3
There should be a timeout for the proxy you are using to make WinHTTP
calls. Should be something like Timeout, CommandTimeout,
ConnectionTimeo ut, etc.

Jul 23 '05 #4
Ok however its not actually the WinHTTP that times out - its the stored
procedure wrapper itself.

The wrapper is as follows as you can see it calls "EXEC
SFIN_Bill_Clien t_CC @Code" that inner SP contains the WinHTTP call.
It might run through 50 records or so before the wrapper times out.

This only happens when its called via SQL job. Using query analyser it
works fine.
ALTER PROC SFIN_Bill_Clien t_CC_All AS
DECLARE @Code varchar(5)
DECLARE curClients CURSOR FAST_FORWARD READ_ONLY
FOR
SELECT CODE FROM VFIN_CC WHERE Autobill = 1 AND Amount > 0
OPEN curClients

FETCH NEXT FROM curClients INTO @Code
WHILE (@@FETCH_STATUS <> -1)
BEGIN
IF @@FETCH_STATUS <> -2
BEGIN
EXEC SFIN_Bill_Clien t_CC @Code
FETCH NEXT FROM curClients INTO @Code
END
END
DEALLOCATE curClients

Jul 23 '05 #5
(wa****@gmail.c om) writes:
Ok however its not actually the WinHTTP that times out - its the stored
procedure wrapper itself.

The wrapper is as follows as you can see it calls "EXEC
SFIN_Bill_Clien t_CC @Code" that inner SP contains the WinHTTP call.
It might run through 50 records or so before the wrapper times out.

This only happens when its called via SQL job. Using query analyser it
works fine.


Well, did you try again, and this time saved the complete error message
from the Step Details in the job history? It would help to see it.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7377
by: David Gamble | last post by:
I am having problems with long timeouts when connecting to or executing commands in SQL Server 2000 SP3. I am writing an application that will be used on laptops within an environment that is wireless. The application is written in VB.NET using the SQL Server managed provider. I have set the "Connect Timeout" parameter on the connection string to 15 seconds and whenever I execute a command, I set the CommandTimeout property to 15...
10
6357
by: HB Kim | last post by:
Hello, What could possibly cause data in the SQL server database to be removed, except being deleted manually? We had a couple of situations where data in certain records disappeared although the records were still there. The data is entered and editted through the web interface in ASP. The web interface is accessed by anyone who has an account in our database. I am more of a web programmer, not a SQL server administrator, so not very...
4
1877
by: ralphm1 | last post by:
Hello, I am running SQL Server 2000 standard in mixed mode security and have two problems. 1.) I created a database as sa and assigned a login as db_owner, however, the design view is grayed out for all tables. All tables are owned by dbo and no user defined role exists for the database. 2.) Any login other than sa will time-out in Enterprise Manager or take
2
1654
by: mircu | last post by:
Hi, I need a quick solution to make my application behave correctly when one of these timeouts occurs. I have some logic in session_start but when the authentication cookie timeouts the user is redirected to login page and after successful login the session is not started. I'd like to have one timeout and when it occurs the user must login and then the new session is started. TIA. Regards, mircu
2
1533
by: Bernie Yaeger | last post by:
I'm getting the following error - not always, only randomly - when I run a certain routine (the routine is a simple executenonquery and it appears to complete despite the message) against sql server 2000: "timout expired. The timeout period elapsed prior to completion of the operation or the server is not responding" Anyone have any idea what causes this and how to avoid it? Thanks for any help.
9
8312
by: craig.overton | last post by:
All, I am currently developing an FTP class in VB.NET. It's kid tested, mother approved when trying to access an FTP Server on a Windows box meaning I can connect, run commands, upload and download a file no problem. My issues come when I try to use the same class with the same commands to access an FTP server on a UNIX box. I can connect and login just fine, but after that all my commands come back "500 'PWD': command not understood."....
1
1719
by: Mike Hofer | last post by:
I really need some help, and I'd appreciate any that you folks can provide. The ASP.NET application in question uses version 1.1 of the .NET Framework. All of the pages use a common base class (derived from System.Web.UI.Page). So, for instance, my home page's inheritance chain looks like this: HomePage Inherits WebPageBase
2
1266
by: =?Utf-8?B?Q29ubnVsbA==?= | last post by:
What could the possible reason be for obtaining "timeouts" when executing a stored procedure from my application? If I execute the specific stored procedure in Query Analyzer I do not get any timeouts and the stored procedure takes approximately 30 to 40 seconds to execute.
2
8043
by: webdevaccount | last post by:
Hello, I am using a Timer and an UpdatePanel control. The Timer is set to 1000 milliseconds, and therefore results in many server request timeouts error (logical). The Server Request Timeout error does not result in a redirection to a blank error page, but rather a pop-up message describing the error appears. My Question: Is there any way to catch this error and prevent it from being displayed?
0
7957
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8020
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8252
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6675
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3875
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1491
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.