Is there a quick way to query what sql agent jobs did not start at all?

  • Ultimately, I want to automate (on a 3rd server) some process that will run a query every 10 minutes, to find out if an agent job did not started at all, and send some message out to alert me.

    That query in essense needs to calculate what is expected to run in the last 10 minutes, and compare with what started these 10 minutes as well.

    Is there anyone who has done something similar?

    Thanks

  • Will one of the following queries get you started?

    SELECT *

    FROM msdb..sysjobactivity

    SELECT *

    FROM msdb..sysjobhistory

    SELECT *

    FROM msdb..sysjobs



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • The part that I need help is how to identify when a job will be executed so I can identify if it is expected to run in the last 10 minutes!

  • The above TSQL Statement given by LutZ will give you the information needed.

    Check the column start_execution_date & Last_execution_date from the sysjobactivity table. From this info, you will know when will be the next schedule.

    "More Green More Oxygen !! Plant a tree today"

Viewing 4 posts - 1 through 4 (of 4 total)

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