I have a few backup jobs of SQL 2000 databases that are scheduled and run
via SQL Agent. Is it possible to have SQL Server run a stored procedure if
a job fails? I only saw options for emailing but that required mail
profiles, etc. Thanks.
David
>I have a few backup jobs of SQL 2000 databases that are scheduled and run
>via SQL Agent. Is it possible to have SQL Server run a stored procedure if
>a job fails?
Sure, create the job with two steps. Step 1 does the bulk of your work. It
is set to quit the job with success, or move to the next step on failure.
The next step (which only gets reached if step 1 fails) can call your stored
procedure, send an e-mail, etc.
A
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment