Blog

How to Get the Table Size in SQL server 2008

Posted by Hemant Srivastava Blogs | SQL Oct 30, 2012
In this blog, we are going to show how we can get the actual data table size in SQL Server-2008 in a very easy way.

In this blog, we are going to show how we can get the actual data table size in SQL Server-2008 in a very easy way.

To get the table size in SQL Server 2008, we need to use a system stored procedure named “sp_spaceused”

If we pass Table Name as an argument, it gives the disk space used by the table and some other information like:

  1. Rows- Number of rows existing in the table,
  2. Reserved- Total amount of reserved space for Table,
  3. Unused- Total amount of space reserved for table but not yet used,
  4. Index_Size- Total amount of space used by indexes in Table.

Image1.jpg

Example

For the ADDRESS table in our database, if we run

sp_spaceused 'TADDRS'

It will give following result: 

Image2.jpg
COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs