Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Provided Answers: 1

    Unanswered: Have the Sql Server Agent Step Failure log sent in Email

    How do I send at step failure email with the log in SQL Server Agent?

    Here is what I have but I want more detail information as to what caused the step to fail. Is there a way to email the log to?

    I have a SQL Server Agent step with the following information - but i want the log information from the step that failed:

    EXECUTE msdb.dbo.sp_send_dbmail
    @profile_name = 'DataTransfer',
    @recipients = '',
    @Subject = 'DataTransfer Failed',
    @Body = 'Please go to SQL Server Agent to review what failed in the DataTransfer job'
    Last edited by jazlady; 10-04-13 at 12:02. Reason: added more info

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Set the steps in the SQL Agent Job to write a log file. It is simpler if they all use the same file, but that means that you will only have the log for the last executed step, but that's usually all that you need or care about.

    In the email that you send, attach the log files.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts