MysteryJimbo (1/6/2012)
Brandie Tarvin (1/6/2012)
Does anyone know why a Transact-SQL job step that executes a stored procedure and returns a "Query timeout" response continues on as if the job step succeeded?Is there anyway to prevent this behavior?
I may be missing the obvious. How do you generate a "Query Timeout" in a stored procedure in a SQL Agent Job?
It's not that hard. It's easier, in fact, to get a Query Timeout in a job step than it is in SSMS. In this instance, the proc has a very heavy query load and is doing lots of calcs. This particular proc is also retrieving information across a Linked Server.
To be clear: I'm not concerned with fixing the timeout issue itself. I've got that covered. What I'm concerned with is how to force a SQL Agent job step to fail if it runs into a timeout issue.