Martin Stevnhoved Posted May 27, 2016 Posted May 27, 2016 It would be nice with a build in option to trigger notifications based on failed Agent Jobs. We are currently using this custom SQL Query in 'msdb': SELECT STUFF((SELECT N', ' + name FROM (SELECT name FROM dbo.sysjobs WHERE (SELECT TOP 1 run_status FROM dbo.sysjobhistory WHERE (step_id = 0) AND (job_id = sysjobs.job_id) ORDER BY run_date DESC, run_time DESC) = 0 AND (enabled = 1)) AS [n1] FOR XML PATH(''),TYPE).value('text()[1]','nvarchar(max)'),1,2,N'') AS [Failed] // Martin. Paul 1
Martin Stevnhoved Posted February 10, 2017 Author Posted February 10, 2017 Any status? The following SQL script shows all failed (and enabled) agent jobs: SELECT name FROM msdb.dbo.sysjobs WHERE ((SELECT TOP (1) run_status FROM dbo.sysjobhistory WHERE (step_id = 0) AND (job_id = dbo.sysjobs.job_id) ORDER BY run_date DESC, run_time DESC) = 0) AND (enabled = 1)
Administrators Paul Posted February 13, 2017 Administrators Posted February 13, 2017 Hi Martin, Thanks. I've pushed this into our todo list. It will be picked by the development team and we'll notify you when this is implemented. -Paul Martin Stevnhoved 1
Martin Stevnhoved Posted November 29, 2018 Author Posted November 29, 2018 (edited) Any status @Paul? Edited December 4, 2018 by Martin Stevnhoved
Administrators Paul Posted December 20, 2018 Administrators Posted December 20, 2018 Hi Martin, This is still on our backlog for the SQL server module. As soon as we touch that module we'll be adding this notification too . -Paul Tyson and Martin Stevnhoved 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now