You are currently viewing SQL Agent Jobs Summary
Microsoft SQL Server

SQL Agent Jobs Summary

A script that summarizes information about SQL Agent job execution history. Much in the same way as the Job Activity Monitor, but with some additional information. Also, this script allows you to run it from T-SQL solutions.

Download the SQL Agent Job Summary script here: SQLAgentJobsSummary.

The columns returned are:

Name: SQL Agent job name.
IsEnabled: Is the job enabled?
JobOwner: Owner of the job.
No_Runs24H: Number of times the job has been run during the last 24 hours.
No_Errors24H: Number of times the job has been executed with one or more errors during the last 24 hours.
LastRun: The last time the job was run.
LastEnd: The last time the job ended.
LastStatus: Status of the last execution. Can be one of the following: Failed, Succeeded, Retry or Canceled.
NextRun: The next scheduled time the job will run.
SuccessAction: What notifications will be made when the job finishes with success. Can be one or more of the following: LogToWindows, Email, Netsend and Page. The operator is appended to the action. For instance Email DBA means an email notification will be sent to the DBA operator.
FailAction: What notifications will be made when the job finishes with failure. Can be one or more of the following: LogToWindows, Email, Netsend and Page. The operator is appended to the action. For instance Email DBA means an email notification will be sent to the DBA operator.
CompletedAction: What notifications will be made when the job finishes, regardless of success or failure. Can be one or more of the following: LogToWindows, Email, Netsend and Page. The operator is appended to the action. For instance Email DBA means an email notification will be sent to the DBA operator.
DateModified: The last time the job was modified.
LatestError: The last time the job executed with an error.
CurrentStep: Unless this is 0, the job is currently executing.
MinRunTime: The fastest execution time from all available history.
MaxRunTime: The longest execution time from all available history.
AvgRunTime: The average execution time from all available history.

Tomas Lind

Tomas Lind - Consulting services as SQL Server DBA and Database Developer at High Coast Database Solutions AB.

Leave a Reply