Jeremy Cottino

Il est bien plus beau de savoir quelque chose de tout que de savoir tout d'une chose. [Blaise Pascal]

SQL Server: Displaying the sizes of your database's tables

1 comment
For maintenance purpose, I needed to create a dashboard that reports database tables’ size to monitor growth of them. The first command that should be known is the sp_spaceused stored procedure. This command returns the following information:
·         Name (table name)
·         Rows (number of rows existing)
·         Reserved (Total amount of reserved space)
·         Data (Total amount of space used by data)
·         Index_size (Total amount of space used by indexes)
·         Unused (Total amount of space reserved but not yet used)
EXEC sp_spaceused 'dbo.Countries'

1 comment :

Post a Comment

Note: Only a member of this blog may post a comment.