[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Want to get 'Failed' word in subject line of email, when job fails

Hi DB Experts,

I am sending mail notification when some job fails, it is by the way of notification operators.

My first problem is i can not register multiple operators for mail notification, i have to create mail alias for that.

Second problem is when the mail notification is sent even if the job is failing in subject line i am getting job completed messege, so i want to customize the subject line and need to have the word 'failed' in subject line, i dont want to do this by sp_send_dbmail option.

Pls. let me know, its urgent.

Regards,
Tejas Shah

0
TejasShahEE
Asked:
TejasShahEE
  • 2
2 Solutions
 
twoboatsCommented:
afaik you can't change what sql agent puts in the subject of the emails it sends
0
 
RimvisCommented:
You can send email by using this SP:
http://support.microsoft.com/kb/312839

Add 2 more steps to your job, let's say "On Failure"  and "On Success".
Then edit your "original" job step. Set "On success action" to "Go to step On Success", "On failure action" to "Go to step On Failure"
0
 
TejasShahEEAuthor Commented:
Hi rimvis,

Your both the suggested ways are programmatic approach, i want to do this by configuring something if possible in sql-2k5.
I did not want to make use of sp_send_dbmail just because it is a programmatic approach!
Let me know only if there are some configuration settings.

Regards,
Tejas Shah
0
 
twoboatsCommented:
Well, not really. I don't believe it can be done the way you want to do it.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now