Maintenance Plan Failure - Add detail to email

  • Is there a way I can add/attach some detail to my failure emails of my Maintenance Plan. e.g. the text information that is sent to the Maintenance Plan logs

    When any part of our Maintenance Plan fails an 'Execute T-SQL Statement Task' is executed -

    The T-SQL statement:

    USE msdb

    GO

    DECLARE @SubjectText VarChar(50)

    SET @SubjectText = @@SERVERNAME + ' - USER DB Maint Plan FAILED!'

    EXEC sp_send_dbmail @profile_name='DBA Group',

    @recipients='DBA.Email@snailmail.com',

    @subject=@SubjectText

  • If you know the name of the text file related to the maint plan for that day, you could send it as an attachment.

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

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