Outlook Rules Are Your Friend

If you are like me, you receive quite a bit of automated e-mails from all of your SQL Server jobs and maintenance plans.  This can take a fair amount of time to read these e-mails daily.  Until now! 

Outlook rules and alerts are a great way to manage this workload.  First of all, and most importantly, use a unique description in the Notify Operator Task for maintenance plan notifications, such as Figure 1.  Be consistent!  Use this same string in all of your backup tasks in your maintenance plans. 

Maintenance Plan Failed

Figure 1

Then create a rule in Outlook (Tools -> Rules and Alerts -> New Rule) to handle these messages.  Personally, I set them to move to another folder to keep them organized, look for specific words in the body (the phrase we put consistently in our notification tasks), and make sure they come from the e-mail account that I setup to alert me from all of my servers (as shown in Figure 2).

Outlook Rules Conditions

Figure 2

 From here, let the fun begin as I then do the following (see Figure 3):

  • Mark them as high importance
  • Flag the message for follow-up today
  • Move it to the specified folder (I know we did this on the last step, but it is highlighted on this step as well, silly Outlook)
  • Display a specific message, Database Backup has FAILED, in the New Item Alert window to ensure that I see it as it happens (granted most jobs are at night, but it will be there waiting for me in the morning)
  • Display a Desktop Alert (can you tell that this is a big deal?)
Outlook Actions

Figure 3

From here you can name the rule and finish the task.  I also like to setup a rule for successful jobs that searches for a successful string that I have designated, but in that case I mark the e-mail as read and move it to the folder in case I need to search for it later. 

For SQL Server Agent jobs, you have to do things just a little bit different since you cannot set a custom string for the alert message.  In that case, search for “STATUS:     Succeeded” (or failed, if that is the case) in the body of the e-mail and setup your other options in the same manner. 

Outlook Rules are your friend, use them to be more productive.  Enjoy!

Advertisement

About SQLGator

Microsoft Data Platform MVP, Florida Gator, Star Wars fanatic and is there anything else...oh yeah PS4! I am a geek and SQL Server Business Intelligence Consultant, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on September 12, 2012, in Maintenance, Monitoring and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

%d bloggers like this: