<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin M SarmientoHow To Forecast Database Disk Capacity If You Don&#8217;t Have A Monitoring Tool &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/how-to-forecast-database-disk-capacity-if-you-dont-have-a-monitoring-tool/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Sun, 19 Jul 2026 15:09:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>How To Forecast Database Disk Capacity If You Don&#8217;t Have A Monitoring Tool</title>
		<link>https://www.edwinmsarmiento.com/how-to-forecast-database-disk-capacity-if-you-dont-have-a-monitoring-tool/</link>
		<comments>https://www.edwinmsarmiento.com/how-to-forecast-database-disk-capacity-if-you-dont-have-a-monitoring-tool/#comments</comments>
		<pubDate>Thu, 30 Jul 2015 01:04:39 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[backup history]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[storage capacity planning]]></category>
		<category><![CDATA[trendline]]></category>
		<guid isPermaLink="false">http://www.edwinmsarmiento.com/?p=1866</guid>

				<description><![CDATA[In a previous blog post, I mentioned why regularly shrinking your databases is not the right way to reclaim space. I also mentioned at the end of the blog post that the proper way to deal with database space issues is to monitor your disk space utilization and do proper capacity planning. That&#8217;s where tools like [&#8230;]]]></description>
					<content:encoded><![CDATA[<p>In a <a href="https://www.edwinmsarmiento.com/why-shrinking-is-not-the-way-to-reclaim-database-space-in-sharepoint/" target="_blank" rel="noopener noreferrer">previous blog post</a>, I mentioned why regularly shrinking your databases is not the right way to reclaim space.</p>
<p>I also mentioned at the end of the blog post that the proper way to deal with database space issues is to monitor your disk space utilization and do proper capacity planning. That&#8217;s where tools like <a href="https://www.sentryone.com/" target="_blank" rel="noopener noreferrer">SQLSentry</a>, <a href="https://technet.microsoft.com/en-us/library/hh205987.aspx" target="_blank" rel="noopener noreferrer">System Center Operations Manager</a> (OpsMgr,) <a href="https://www.idera.com/" target="_blank" rel="noopener noreferrer">Idera</a>, <a href="http://www.solarwinds.com/database-performance-analyzer-sql-server" target="_blank" rel="noopener noreferrer">SolarWinds</a>, <a href="http://www.dell.com/learn/us/en/vn/secure/acq-quest" target="_blank" rel="noopener noreferrer">Quest Software</a> (now a part of Dell,) etc. come into the picture. These monitoring tools not just check for the health of your databases but they also collect operational data such as CPU, memory and disk space utilization.</p>
<p>But, what if you don&#8217;t have those monitoring tools yet? Where do I get the operational data for my database disk capacity? I do have the current size of the databases but that wouldn&#8217;t be enough to do capacity planning and forecasts. How else can I perform capacity planning for my storage requirements?</p>
<h3>Backups Are More Than Just For Disaster Recovery</h3>
<p>I ended the <a href="https://www.edwinmsarmiento.com/why-shrinking-is-not-the-way-to-reclaim-database-space-in-sharepoint/" target="_blank" rel="noopener noreferrer">previous blog post</a> with a question: &#8220;<strong>do you have database backups?</strong>&#8221; If you do (and I sure hope so,) you&#8217;re in luck. I bet that you also have a place where you store those database backups for archiving such as a tape, file server or even a backup server. As a high availability and disaster recovery expert, I used to think that backups are merely for the &#8220;<em><span style="color: #800000;">ooopppss</span></em>&#8221; moments that happen every once in a while.  In fact, that&#8217;s how I sell the importance of backups: <span style="color: #0000ff;"><strong>they&#8217;re an insurance policy</strong></span>. But a couple of years ago, I&#8217;ve learned that backups are more than just for disaster recovery. One of my customers asked me to recommend a hardware configuration for upgrading their existing database server. One of their main concerns is storage capacity and they wanted to plan and budget for at least two years worth of storage. Since they don&#8217;t have a monitoring tool in place, I started to look elsewhere to find the operational data that I need. And, guess where I found them? That&#8217;s right, on the backup files.</p>
<h3>Using Backups For Storage Capacity Planning (and even with Availability Groups)</h3>
<p>Since <a href="https://msdn.microsoft.com/en-ca/library/ms175477.aspx" target="_blank" rel="noopener noreferrer">full backups</a> in a SQL Server database contain all of the data and enough transaction log records to recover the database, the backup size is a good measurement of the required disk space. If you have your backups, you can check the file sizes of all the previous full backups that you have. The only challenge is if you only keep a day&#8217;s worth of backup files. That&#8217;s no different from checking the current size of your database with a little bit of free space added. There are a couple of places to look for the historical data about your backups.</p>
<ul>
<li><strong>Backup server</strong>. If you are using an enterprise backup tool, it has it&#8217;s own data collection utility specifically for backups. This includes the name of the server where the backup is from, the date/time when the backup was taken, the size of the backup file, duration, etc. This is good enough information to use for storage capacity planning.</li>
<li><strong>msdb database in SQL Server</strong>. Every database backup you take in SQL Server will have a metadata. That metadata is stored in the <strong><em>msdb</em></strong> database. That&#8217;s where SQL Server Management Studio takes the information to tell you what backups were taken previously.</li>
</ul>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/restoreDB_SQL2000.gif"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1871" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/restoreDB_SQL2000.gif" alt="restoreDB_SQL2000" width="494" height="456" /></a></p>
<p style="text-align: center;"><em>This is certainly not SQL Server Management Studio. But it&#8217;s good for illustration purposes.</em></p>
<p>You can use the query below to retrieve a list of all the full database backups taken for a specific database, the size and the date/time when they were taken.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">SELECT </span><span style="color: black;">backup_start_date</span><span style="color: gray;">, </span><span style="color: black;">backup_size</span><span style="color: gray;">/</span><span style="color: black;">1073741824 </span><span style="color: blue;">AS </span><span style="color: black;">backup_size_GB<br />
</span><span style="color: blue;">FROM </span><span style="color: black;">msdb.dbo.backupset a </span><span style="color: blue;">INNER JOIN </span><span style="color: black;">msdb.dbo.backupmediafamily b<br />
</span><span style="color: blue;">ON </span><span style="color: black;">a.media_set_id </span><span style="color: blue;">= </span><span style="color: black;">b.media_set_id<br />
</span><span style="color: blue;">WHERE TYPE=</span><span style="color: red;">'D' <span style="color: blue;"><span style="color: #000000;">and</span> database_name=</span><span style="color: red;">'sampleTestDB'</span><br />
</span></code> </div>
<p>Even if you only have a month&#8217;s worth of backup history information, it will be good enough to get you started. This is where we&#8217;ll need <a href="https://products.office.com/en-us/excel" target="_blank" rel="noopener noreferrer">Microsoft Excel</a>. Here&#8217;s how you can use Excel with your backup history information to use for storage capacity planning:</p>
<ol>
<li style="list-style-type: none;">
<ol>
<li><strong>Enter your backup history information into an Excel spreadsheet. </strong>This is the easy part. You can just copy-and-paste the results of the query provided from SQL Server Management Studio to Excel</li>
<li><strong>Format the data to use the appropriate data type</strong>. Sometimes, Excel does not use the appropriate data type for the copied data. Make sure that you format the data to use the appropriate data type. This will be helpful when we go to the next step.</li>
</ol>
</li>
</ol>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel.jpg"><img decoding="async" class="aligncenter size-medium wp-image-1873" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel-300x263.jpg" alt="dateTime_Excel" width="300" height="263" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel-300x263.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel-457x400.jpg 457w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel-82x72.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/dateTime_Excel.jpg 539w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<ol>
<li style="list-style-type: none;">
<ol>
<li><strong>Create a line graph based on the data</strong>. Select the data range in the Excel spreadsheet, click the <strong>Insert</strong> tab and select a line graph.</li>
</ol>
</li>
</ol>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph.jpg"><img decoding="async" class="aligncenter size-large wp-image-1878" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-1024x683.jpg" alt="ExcelLineGraph" width="760" height="507" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-1024x683.jpg 1024w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-300x200.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-760x507.jpg 760w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-518x345.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-250x166.jpg 250w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-82x55.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph-600x400.jpg 600w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelLineGraph.jpg 1227w" sizes="(max-width: 760px) 100vw, 760px" /></a></p>
<ol>
<li><strong>Create a trendline from the given line graph. </strong>Once you have the line graph, right-click anywhere near the data points and select <strong>Add Trendline</strong>. We will add a linear trend line to forecast the database backup size for the next 6 months.</li>
</ol>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1881" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline.jpg" alt="ExcelFormatTrendline" width="957" height="637" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline.jpg 957w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-300x200.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-760x506.jpg 760w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-518x345.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-250x166.jpg 250w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-82x55.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/07/ExcelFormatTrendline-600x399.jpg 600w" sizes="(max-width: 957px) 100vw, 957px" /></a></p>
<p>We now have a crude way of doing linear regression analysis of our storage capacity requirement for a specific database. All we have to do now is do this for all of our databases, forecast data for a specific period, sum it all up and multiply by a <a href="https://en.wikipedia.org/wiki/Factor_of_safety" target="_blank" rel="noopener noreferrer">factor of safety</a> value &#8211; say twice the total storage requirement. Now, I don&#8217;t want to claim expertise in statistical analysis especially since I almost failed my statistics course in college. But this is a relatively easy way to forecast disk capacity requirements if you don&#8217;t have monitoring in place.</p>
<p>There&#8217;s a lot of things we can do with Excel. In fact, I did this exact same thing with another customer who requested for a storage capacity requirement for a three (3) replica Availability Group. Since the storage requirement for an Availability Group replica is the same as the primary replica, it&#8217;s safe to just multiply the storage requirements with the number of replicas.</p>
<p>Let me know what else you come up with in your day-to-day tasks managing SQL Server databases with Excel.</p>
<h4>Additional Resources</h4>
<ul>
<li><a href="https://support.office.com/en-au/article/Add-change-or-remove-a-trendline-in-a-chart-072d130b-c60c-4458-9391-3c6e4b5c5812" target="_blank" rel="noopener noreferrer">Add, change, or remove a trendline in an Excel chart</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/ms188653.aspx" target="_blank" rel="noopener noreferrer">Backup History and Header Information (SQL Server)</a></li>
<li><a href="http://sqlactions.com/2012/05/15/collection-and-reporting-of-perfmon-data-for-sql-server-capacity-planning-and-trend-analysis/" target="_blank" rel="noopener noreferrer">Collection and Reporting of Perfmon data for SQL Server “Capacity Planning” and “Trend Analysis” </a></li>
</ul>
<p style="text-align: center;"><div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><strong><br />
</strong></p>
<h1>Get more &#8220;smart hacks&#8221; like this straight to your inbox.</h1>
<p><center><script>(function() {
	window.mc4wp = window.mc4wp || {
		listeners: [],
		forms: {
			on: function(evt, cb) {
				window.mc4wp.listeners.push(
					{
						event   : evt,
						callback: cb
					}
				);
			}
		}
	}
})();
</script><!-- Mailchimp for WordPress v4.13.1 - https://wordpress.org/plugins/mailchimp-for-wp/ --><form id="mc4wp-form-1" class="mc4wp-form mc4wp-form-2722" method="post" data-id="2722" data-name="Subscribe" ><div class="mc4wp-form-fields"><p>
    <input type="text" name="FNAME" placeholder="First Name" required> &nbsp;&nbsp;
	<input type="email" name="EMAIL" placeholder="Your email address" required /> &nbsp;&nbsp;
	<input type="submit" value="Keep me updated!" />
</p></div><label style="display: none !important;">Leave this field empty if you&#039;re human: <input type="text" name="_mc4wp_honeypot" value="" tabindex="-1" autocomplete="off" /></label><input type="hidden" name="_mc4wp_timestamp" value="1785666944" /><input type="hidden" name="_mc4wp_form_id" value="2722" /><input type="hidden" name="_mc4wp_form_element_id" value="mc4wp-form-1" /><div class="mc4wp-response"></div></form><!-- / Mailchimp for WordPress Plugin --></center></p>
<p style="text-align: center;"></div></p>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/how-to-forecast-database-disk-capacity-if-you-dont-have-a-monitoring-tool/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">1866</post-id>	</item>
	</channel>
</rss>