Hello,
Is there a way to get the error message in a scheduled task?
I've a backup scheduled with two steps. The first step is the backup
procedure and the second step is a t-sql code which fires an email to
the backup operator.
How can i set the error in the email message if the schedule fails?
ThnxJust a quick thought. If you have both the backup and the emailing code in
the same step, may be you could capture the @.@.ERROR variable after the
backup completes/fails. If @.@.ERROR is not 0, then you know you have an
error.
The way I deal with this is, using Microsoft Operations Manager. You can get
this to email you when a job fails.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jason" <jasonlewis@.hotrmail.com> wrote in message
news:uSlWOlbkFHA.3316@.TK2MSFTNGP14.phx.gbl...
Hello,
Is there a way to get the error message in a scheduled task?
I've a backup scheduled with two steps. The first step is the backup
procedure and the second step is a t-sql code which fires an email to
the backup operator.
How can i set the error in the email message if the schedule fails?
Thnx|||I find it easiest to define an output file for the first job step and includ
e that output file in
the emailing step.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jason" <jasonlewis@.hotrmail.com> wrote in message news:uSlWOlbkFHA.3316@.TK2MSFTNGP14.phx.g
bl...
> Hello,
> Is there a way to get the error message in a scheduled task?
> I've a backup scheduled with two steps. The first step is the backup proce
dure and the second step
> is a t-sql code which fires an email to the backup operator.
> How can i set the error in the email message if the schedule fails?
> Thnx
No comments:
Post a Comment