Is it possible to have an alert fire when a SQL job fails AND include the error message in the alert body?
Dan
Saw this thread and opened up some of mine and I see exactly what you're talking about now. I wonder if there is a way to do this as it would be nice to add a bit of info to the recipients of some of the messages that get generated by my environment.
If you add a failure step to your SQL job to write to the Windows Application log on the SQL server, you can use a SAM Windows Event Log monitor to alert on the event. The macro ${N=SwisEntity;M=ComponentAlert.WindowsEventMessages} can be used in an Alert (Component Alert type) to capture the Windows Event Log Message information - depending on what SQL writes out into the Application log, it may get you what you need.
I'm trying to adapt this to via the SQL Server User Experience Monitor
Basically we need just to return failed jobs including their error message in 1 column and a numerical value in another.
Job Failure