<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Job Monitoring on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/job-monitoring/</link><description>Recent content in Job Monitoring on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Sat, 11 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/job-monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>SQL Server Agent Job Failure History Report</title><link>https://www.sqlserver70.com/post/sql-server-agent-job-failure-history-report/</link><pubDate>Sat, 11 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-agent-job-failure-history-report/</guid><description>
&lt;h2 id="report-sql-server-agent-job-status-and-failure-history"&gt;Report SQL Server Agent Job Status and Failure History&lt;/h2&gt;
&lt;p&gt;This script queries the SQL Server Agent job history stored in msdb to produce a detailed report of each job's most recent run status, failure and success counts over the last 60 days, total lifetime run counts, and job step information including subsystem type and proxy name.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="8593449130"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;SQL Server Agent jobs automate the critical work of database backups, index maintenance, integrity checks, ETL loads, and more. When a job fails, the impact can range from a missed backup to a halted data pipeline. Knowing which jobs failed, how recently they failed, and whether failures are isolated events or a recurring pattern is essential for any DBA. This script, written by Jason Brimhall and published in the ktaranov/sqlserver-kit community repository, uses a series of common table expressions to build a rich job history report. It shows the most recent outcome for each job status type, counts failures and successes within the last 60 days relative to the latest run, and includes job step details. To report only failures, uncomment one line. Run this script in the context of the &lt;code&gt;msdb&lt;/code&gt; database.&lt;/p&gt;</description></item></channel></rss>