Failed Jobs report

  • I'll recheck one last time to be sure. I've got to ask: you did create the stored-procedure and are executing it correct?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Also, note the threshold being checked:

    'WHERE

    b.Sql_Severity <> 0

    AND run_date = REPLACE(CONVERT(VARCHAR(10),GETDATE(),121),''-'','''') '+

    'AND [run_time] >= '''+REPLACE(CONVERT(VARCHAR(20),DATEADD(minute, -20,GETDATE()),08),':','')+''''+

    ' ORDER BY [run_date],a.[Name],b.[step_id] '

    This only goes back 20 minutes, if you want to go back longer, increase the timeframe being checked

    Verified the code, it is working correctly.

    To test it without creating/altering the procedure (so you can run it as-is) simply comment out these lines:--ALTER PROCEDURE [dbo].[utl_dba_CheckSQLJobsForErrors]

    declare@notifyEmailGroup VARCHAR(300) ='your@emailaddress.com'

    --AS

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • This is a report I wrote some time ago, it utilizes a source table (servers you want to monitor) that you need to populate.

    It does utilize linked servers...as others have said there are better ways to do this (Powershell, SSRS...etc) at the time, this is all I knew how to do and it worked pretty good.

    It will monitor failed jobs, ping servers and monitor SQL server services provided you have the service name correctly defined by server (i.e. default name vs. a named instance name).

    Hope this helps...it needs a little tweaking based on where you run it from (do a find and replace) but it is designed to be a drop and run and alittle configuration...

    Give it a try on a test box and see if it fits the bill.

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply