10-04-13, 10:40 #1Registered User
Provided Answers: 1
- Join Date
- Sep 2005
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:
@profile_name = 'DataTransfer',
@recipients = 'email@example.com',
@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 11:02. Reason: added more info
10-04-13, 12:56 #2Resident Curmudgeon
Provided Answers: 54
- Join Date
- Feb 2004
- In front of the computer
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.
-PatPIn theory, theory and practice are identical. In practice, theory and practice are unrelated.