Retrieving the an SQL Agent job's specific error
- by Tom Andrews
I am using msdb..sp_help_job to access whether a job succeeded or failed and can retrieve a general error.
But, I want to access the specific error for the step that failed. I cannot seem to find it. It is not in this list of helpful stored procedures provided by MS
http://msdn.microsoft.com/en-us/library/ms187763%28v=SQL.100%29.aspx
The account running the query is limited but does have the SQLUserAgent role and owns the Jobs that it is accessing.