Volleynerd Knowledge Base

Tuesday, February 20, 2007

Displaying the Sizes of Your SQL Server's Database's Tables


Very often in the DB circles, the question comes up: "how big is that database?"

Finally, the answer (at least for SQL Server):

sp_spaceused


Thanks to 4GuysFromRolla for pointing this out.

Displaying the Sizes of Your SQL Server's Database's Tables

...and this gem for repeating the command for each table in the DB:
EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"



Comments: Post a Comment

Home