<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Backupset on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/backupset/</link><description>Recent content in Backupset on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/backupset/index.xml" rel="self" type="application/rss+xml"/><item><title>SQL Server Backup History: Duration and Size Report</title><link>https://www.sqlserver70.com/post/sql-server-backup-history-duration-size-report/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-backup-history-duration-size-report/</guid><description>
&lt;h2 id="query-backup-duration-and-file-size-from-sql-server-history"&gt;Query Backup Duration and File Size from SQL Server History&lt;/h2&gt;
&lt;p&gt;This script queries SQL Server's msdb backup history to report the backup type, start and finish time, duration in minutes, and file size in both megabytes and gigabytes for every backup across all user databases on the server.&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;Knowing that a backup completed is only part of the picture. DBAs also need to understand how long each backup took and how large the resulting files are. A backup that used to finish in ten minutes now taking an hour is worth investigating. A backup file that is half its usual size may indicate a failed or partial operation. This script, adapted from the DBA-Scripts collection by Bulent Gucuk, joins &lt;code&gt;sys.databases&lt;/code&gt; with &lt;code&gt;msdb.dbo.backupset&lt;/code&gt; and &lt;code&gt;msdb.dbo.backupmediafamily&lt;/code&gt; to surface both duration and size in a single result set. Running it regularly gives you a baseline so that anomalies are easy to spot.&lt;/p&gt;</description></item></channel></rss>