Customising Emailled Job Completion Notifications

  • Hi,

    I've a number of scheduled jobs that run on SQL 2005 servers each night, resulting in about 1000 job completion notifications landing in my inbox everyday. It's important for me to know quickly at the start of the day which jobs have failed, but the subject line of the Default job completion emails gives no indication of job failure or success, I need to look inside the email to see if it failed or not. I've been doing this every morning for a couple of months, but it's pretty inefficient.. My eye moves faster than my hand, and it would be easier for me just to sort the folder these emails arrive in by subject, so that the failed jobs are at the top.

    Currently the subject line is along the lines of:

    "SQL Server Job System: '%JobName%' completed on %InstanceName%"

    I'd like to alter the Subject line of the emails being sent so that they begin with the Completion Status.. For example

    "%Status% - Job %JobName% on %InstanceName%" and do away with all Microsofts superfluous junk. Is it possible to just edit a system table to do this? Or run an XP with the correct tokens?

  • DaftUsername (6/9/2008)


    It's important for me to know quickly at the start of the day which jobs have failed

    Is there any need then to notify by email on anything other than a failure? I can't imagine how annoyed I would be if I spent hours looking through all of those emails only to find that all jobs were successful...lol.

    Turn off the notification of success, would be your best bet. Otherwise, are you using outlook? Set up a rule to scan the subject AND message body for the word failure or failed.

    "Got no time for the jibba jabba!"
    -B.A. Baracus

  • Thanks.. I've already gone down these routes..

    a) I'm far from annoyed when I get success reported with everyone of them! It means I can take the rest of the morning off!! 😉

    b) Outlook rules are fine, I'd already thought abnout that, but I have a nice little iPhone that I'd like to check these on on the way to work.. :w00t: Sad I know, but it was the only way that I could convince the boss to buy me an iPhone! Should have waited a couple of months then I could have a GPS and 3G as well! 🙁

    c) I'm not the only one that looks at these alerts.. Trouble is, I have some lazy co-workers who really can't be bothered to open them, so sit with their finger on the delete key without really taking in what they're seeing.. It's not been unknown for them to miss failure.

    d) yes, I need successes as well as failures. If the job doesn't run, or doesn't complete on time, then I don't get an email. It's a quick sanity check to make sure I have 967 emails in my inbox every morning. 966 means on server encountered a problem and the job didn't complete. (Or the firewall was down, or the exchange server, or ....)

    Anyway, suffice to say, I have legit reasons for wanting to alter the subject line of the emails I receive.. Please can someone help??

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply