How Much Space is used by all SQL Server Databases ?

Leave a comment (0) Go to comments

This is the very handy question during the operational support. There are various scripts available to get this info. Here is the smallest script to get space utilization by all databases on a given database.

This is a useful script I use to list the space used for all databases on a given sql server

EXEC sp_msforeachdb @command1="use ? exec sp_spaceused @updateusage = N’TRUE’;"

The purpose of passing the argument : @updateusage , is it updates the usage information

Tags: T-SQL script to report space used for all databases,sp_spaceused,Determining space used for database in SQL Server,Monitoring server disk space in SQL Server,How to retrieve SQL Server database disk space in use,Sql Server. Get space used,Check All Databases For File Space Used,Space Used by Database,sp_msforeachdb ,sp_spaceused

EOF - How Much Space is used by all SQL Server Databases ?, SQL Server 2012 , 2008 R2 , 2008 , 2005 , 2000

Leave a Reply

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


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.