<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Msdb on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/msdb/</link><description>Recent content in Msdb on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Fri, 10 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/msdb/index.xml" rel="self" type="application/rss+xml"/><item><title>SQL Server Backup Status Report: All Databases</title><link>https://www.sqlserver70.com/post/sql-server-backup-status-report-last-backup-all-databases/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-backup-status-report-last-backup-all-databases/</guid><description>
&lt;h2 id="check-sql-server-backup-age-across-all-databases"&gt;Check SQL Server Backup Age Across All Databases&lt;/h2&gt;
&lt;p&gt;This script queries the SQL Server backup history catalog to report the most recent full, differential, and transaction log backup for every database, including how many hours and minutes ago each backup completed.&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;Database backups are your last line of defense against data loss. Knowing exactly when each database was last backed up — and how old that backup is right now — is a fundamental DBA responsibility. This script, originally written by Tim Ford, joins &lt;code&gt;master.sys.databases&lt;/code&gt; with the msdb backup history tables to produce a single report covering all backup types for all databases. It shows the backup finish time, the physical backup file path, and elapsed time in both hours and minutes, making it straightforward to spot any database that has missed a scheduled backup.&lt;/p&gt;</description></item><item><title>SQL Server Verify Backup Files: RESTORE VERIFYONLY</title><link>https://www.sqlserver70.com/post/sql-server-verify-backup-files-restore-verifyonly/</link><pubDate>Mon, 06 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-verify-backup-files-restore-verifyonly/</guid><description>
&lt;h2 id="verify-sql-server-backup-files-with-restore-verifyonly"&gt;Verify SQL Server Backup Files with RESTORE VERIFYONLY&lt;/h2&gt;
&lt;p&gt;Backup files that cannot be restored are worthless, and many DBAs discover problems only when they attempt an actual restore under pressure. The scripts in this article use &lt;code&gt;RESTORE VERIFYONLY&lt;/code&gt; to confirm that backup files are readable and internally consistent before a real disaster occurs.&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;&lt;code&gt;RESTORE VERIFYONLY&lt;/code&gt; reads a backup file and validates its structure without writing any data to a database. It checks that the backup set is complete, that all volumes are readable, and that header metadata is intact. It does not verify that every data page is logically consistent, but it catches the most common failure modes: truncated files, corrupted headers, and missing media families.&lt;/p&gt;</description></item><item><title>SQL Server Point-in-Time Restore with STOPAT</title><link>https://www.sqlserver70.com/post/sql-server-point-in-time-restore-script-stopat/</link><pubDate>Sun, 05 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-point-in-time-restore-script-stopat/</guid><description>
&lt;h2 id="recover-a-sql-server-database-to-a-specific-point-in-time"&gt;Recover a SQL Server Database to a Specific Point in Time&lt;/h2&gt;
&lt;p&gt;SQL Server's &lt;code&gt;RESTORE LOG ... WITH STOPAT&lt;/code&gt; lets you roll a database back to any exact moment covered by your backup chain. This guide walks through querying backup history in &lt;code&gt;msdb&lt;/code&gt;, executing the restore sequence, and verifying the result.&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;Data loss incidents — accidental deletes, bad deployments, runaway updates — rarely happen at a convenient backup boundary. Point-in-time restore solves this by replaying transaction logs only up to a target timestamp, leaving the database in a consistent state as of that moment.&lt;/p&gt;</description></item></channel></rss>