Drive Space Monitoring Page

Updated: February 22, 2012

Some time ago, I wrote and published a routine to gather disk space usage from multiple SQL Servers. Since that was written, I’ve made some bug fixes and modifications to the routine. Tracking down those changes was becoming tedious, as they were spread out over several blog posts. I’ve decided to create this page to overcome that issue. This page will always contain the latest version of the routine. The date at the top will reflect the last time I’ve made changes.

The zipfile found here contains all the code needed for this procedure. It also includes a bonus stored procedure, SQLDriveSpaceWarningEmail.sql, which I wrote about at the end of this post.

Changelog

2/22/12

  • Corrected error in script zipfile – script for ServersToCheckDiskStats table did not include IncludeInCheck column.

7/21/11

  • Added IncludeInCheck column to ServersToCheckDiskStats table. This allows skipping of servers. Due to the foreign key constraints, you are not able to delete records from this table if there is stat data for that server in the stats table. So if a server is decommissioned or renamed or no longer needs to be tracked, set this bit to true and it will be skipped in the data collection process.
  • Added SeverDisplayName column to ServersToCheckDiskStats table. If you are checking servers in different domains, this allows you to put an IP address in the ServerName field to connect with. The ServerDisplayName field will display the user-friendly name for use in reports and is the name stored in the DatabaseDiskStats table. If you are not using IP addresses, the ServerName and ServerDisplayName fields should be the same.
  • Modified GatherServerDiskUsageData procedure to use above new columns.
  • Added Notes column to ServersToCheckDiskStats table. Just a place to store notes.

Leave a Reply

Your email address will not be published. Required fields are marked *

I am a real person and can prove it by doing this math problem: (required) Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.