Determine Space Consumed by each Table in a SQL Server database

Please see below query, which will help you to determine Space Consumed by each Table in a database


   
 


Query used as below:

       select  OBJECT_NAME(object_id) as objname

            , SUM (reserved_page_count) * 8192/ 1024 as reserved_kb

            , SUM(used_page_count) * 8192 / 1024 as used_kb

    from sys.dm_db_partition_stats

    group by OBJECT_NAME(object_id)

    order by reserved_kb desc
   

Comments

Popular posts from this blog

Request failed with HTTP status 503 Server Error

How to Troubleshoot Subscription issue in Reporting Services

First hit to Reporting services is slow