how to include error messages into backup reports for SQL Server 2008 R2?

Posted by avs099 on Server Fault See other posts from Server Fault or by avs099
Published on 2012-04-11T22:26:24Z Indexed on 2012/04/11 23:33 UTC
Read the original article Hit count: 199

Right now I have daily (differential) and weekly (full) backups set on my SQL Server 2008 R2 as jobs for SQL Server Agent with email notifications if job fails. I do get emails like this:

JOB RUN: 'Daily backup.Diff backup' was run on 4/11/2012 at 3:00:00 AM

DURATION: 0 hours, 0 minutes, 28 seconds

STATUS: Failed

MESSAGES: The job failed. The Job was invoked by Schedule 9 (Daily backup.Diff backup). The last step to run was step 1 (Diff backup).

but often that happens because we delete/create new databases - and diff backup fails. And the only way for me to see the actual reason is to go to Log Viewer -> Maintenance Plans logs.

Is it possible to include "Error Message" field from the logs into notification emails? And more generic - is it possible to change notification email templates somehow?..

Thanks you.

© Server Fault or respective owner

Related posts about sql-server

Related posts about email