Email from Sql Server - How to change Subject line?

We have a overnight SQL job that upon completion sends out an email.

Everything works fine, but I'd like to change the subject line of the email.  I can not figure out where the subject line is defined.  At this point it seems to me that the format of the email is a default.

We get the following in the email ...

header info:
From: IT Adminsistrator (Administrator@company.com)
To: me; you
Subject: SQL Server Job System: 'Overnight_Job' completed on \\TestServer

body:
Jub Run: 'Overnight_Job' was run on mm/dd/yyyy at 2:30 am
Duration: 10 minutes
Status:     Succeeded
Messages: The Job succeeded.  The job was invoked by Schedule 17 (Overnight_Job) .  The last step run was step 20 (step 12c)

Is there a way to change the Subject line?  In the Subject line, I'd like to include Success or Failure, put the Server name first and the job name last.

Thank you,
Mark
MarkMahonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee SavidgeCommented:
You could just configure it to send an email if it failed. That way if you get one you know it has failed without having to read the email. I don't believe you can configure the email contents for this. I've never looked too deeply at this so I may be wrong.
0
MarkMahonAuthor Commented:
Isavidge, thanks for the suggestion.  But we like the daily email as it gives us a sense of the job length.  
0
Anthony PerkinsCommented:
>>Everything works fine, but I'd like to change the subject line of the email.  I can not figure out where the subject line is defined.<<
What is generating this message?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

MarkMahonAuthor Commented:
acperkins ...

I don't understand your question ... the sentence you highlighted is not a part of the email but rather a part of my question  ">>Everything works fine, but I'd like to change the subject line of the email.  I can not figure out where the subject line is defined.<<"

The email is the following ....
header info:
From: IT Adminsistrator (Administrator@company.com)
To: me; you
Subject: SQL Server Job System: 'Overnight_Job' completed on \\TestServer

body:
Jub Run: 'Overnight_Job' was run on mm/dd/yyyy at 2:30 am
Duration: 10 minutes
Status:     Succeeded
Messages: The Job succeeded.  The job was invoked by Schedule 17 (Overnight_Job) .  The last step run was step 20 (step 12c)

0
Lee SavidgeCommented:
Sadly this is built into SQL Server. You can't change the subject. See here for options: http://www.go4answers.com/Example/modify-subject-line-notification-e-78493.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MarkMahonAuthor Commented:
Isaidge - thanks for finding that question and comments.

If I get a few moments I might try the suggestion in the thread of sending the email via the sp_send_dbmail.  I have also used SSIS to successfully send email with modified Subject lines.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.