Home Forums SQL Server 2008 T-SQL (SS2K8) SQL PROCEDURE TO FIND THE LIST OF JOB FAILURES FOR CURRENT HOUR RE: SQL PROCEDURE TO FIND THE LIST OF JOB FAILURES FOR CURRENT HOUR

  • Any particular reason to log it to a table, instead of just definining a view that queries the last hour of data?

    Either way, you'll get most of your data out of msdb.dbo.sysjobhistory (details: http://msdn.microsoft.com/en-us/library/aa260416(v=SQL.80).aspx) and possibly out of the error log (there are ways to query this, but so far as I know they're all undocumented, so you'll need to research them yourself). Most of the data should be in the sysjobhistory table.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon