Another SQL 2012 Improvement

I’ve been playing around some more with SQL 2012 and I discovered another nice little improvement. This isn’t anything huge, but rather a nice little touch that makes my life as a DBA a little bit easier.

If you have your SQL Agent jobs configured to send you email when they fail (or succeed or complete), in the past, you got an email with a subject line that read:

SQL Server Job System: ‘<job name> completed on \\<instance name>

That just tells you that the job ran. You had to actually open the email and see if SQL reported failureĀ  or success.

With SQL 2012, email notification subject lines now look like this:

[The job succeeded.] SQL Server Job System: ‘<job name>’ completed on \\<instance name>

or

[Failed] SQL Server Job System: ‘<job name>’ completed on \\<instance name>

To me, that’s a huge quality of life improvement. Now it’s really easy to see if a job failed or succeeded. It’s also very easy to write automatic routing rules in your email client to route the messages appropriately. It also can make things less confusing for end users. Sometimes another member of the IT team will be updating some software during a maintenance window and they want a backup of the database made before they start. In this case, I would often schedule a backup job at the start of the maintenance window and have SQL send an email to the person doing the upgrade when it completed. When they got this email, they were OK to start the update. That enabled me to stay out of the process (which is nice when the maintenance window starts at 1 AM). But the problem is I would have to make sure to tell them that subject line just says the job completed and they would need to open the email to see if it actually succeeded or failed. Now, they can just read the subject line.

Leave a Reply

Your email address will not be published. Required fields are marked *

I am a real person and can prove it by doing this math problem: (required) Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.