SP_SpaceUsed for Disk Space Monitoring?

Recently, I heard about a couple of developers that were using the stored procedure SP_SpaceUsed to monitor available disk space.  They had requested additional disk space because the utility had told them that there was only 4mb of unallocated space.  Try not to laugh because these could be YOUR developers.

Last month I blogged about using the procedure to show you the estimated backup size for the database.  But these developers were confusing unallocated space, which is actually just space in the database that has not been allocated.  For example, when you set a autogrowth interval and your database grows in accordance with the interval you will now have unallocated space until the database takes that free space.  Enjoy!

database_name database_size unallocated_space
<Database Name> 2449.81 MB 40.45 MB
reserved data index_size unused
2396472 KB 2386856 KB 5144 KB 4472 KB

About SQLGator

Microsoft Data Platform MVP, Florida Gator, Star Wars fanatic and is there anything else...oh yeah PS4! I am a geek and SQL Server Business Intelligence Consultant, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on March 14, 2013, in Maintenance. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

%d bloggers like this: