March 26, 2010 at 1:21 pm
hi,
i have a job with 10 steps.
i want to have a job failure notifcation, if any of the step fails.
the steps are set up to run one after another with out dependences.
all the steps run twice daily.
can we have in tsql code, instead of on the job properties window.
EX :job1:
step1: call the ftp
step2:load the file
step3:run the update
step4:setup the files for letter
so, if step2 fails ,but the whole job is a success with a warning ,
then how do we code for that notification to be sent..
Thanks
s
March 26, 2010 at 1:53 pm
Easiest way is to fail the job if any step fails. Then setup your database mail and add operators. Setup the job to notify your operator if the job fails.
You can also mail directly in T-SQL, say as part of a TRY-EXCEPT block.
You can also do it in SSIS.
March 26, 2010 at 2:11 pm
hi,
The business rule is to run all the steps,so i canot stop the job.
this is for monitoring purpose for us to know which steps failed and react.
March 26, 2010 at 3:58 pm
dsandhyarao (3/26/2010)
hi,The business rule is to run all the steps,so i canot stop the job.
this is for monitoring purpose for us to know which steps failed and react.
I don't think that is possible in GUI, may be you can write custom script for job steps process.
March 26, 2010 at 9:56 pm
Not sure I understand this one. If the steps have no dependencies, and you want to run every step regardless of the success or failure of a prior step...why not just create separate jobs?
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply