apr 17 blog

T-SQL Get a quick overview of the sizing in SQL Database

Use the Script below to get a quick overview of the table size in you DB:


select OBJECT_NAME(object_id), SUM(reserved_page_count) / 128 as ReservedMB, sum(used_page_count) / 128 as UsedMB, MAX(row_count) AS Records
from sys.dm_db_partition_stats
group by object_id
order by SUM(reserved_page_count) desc

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+

One comment on “T-SQL Get a quick overview of the sizing in SQL Database

Der er lukket for kommentarer