How to determine the SQL Server database table sizes

book

Article ID: 181017

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

You can run the attached SQL Query in the SQL Management Studio for SQL Server 2005 or SQL Server 2008.

This query shows the following information for all tables larger than 5 KB,

  • the table name
  • the number of rows in the table
  • the amount of disk spaced reserved for the table, in GB's
  • the percent of the reserved space that is currently unused

Attachments

show-table-sizes-4g.sql.txt get_app