语句如下:
select object_name(b.object_id) TableName,
sum(a.total_pages) TotalPages,
Sum(a.total_pages)*8/1024 Size_MB,
Sum(a.total_pages)*8/1024/1024 Size_GB
from sys.system_internals_allocation_units a
join sys.partitions b on a.container_id = b.partition_id
group by object_name(b.object_id)
order by Size_MB desc