SQL Server 表占用空间统计

EXEC sp_spaceused @updateusage = N'TRUE'

----

SELECT object_name(object_id) as ObjName,
index_id as IndexID,
sum(in_row_data_page_count) as InRowDataPages,
sum(lob_used_page_count) as LargeObjectPages,
sum(row_overflow_used_page_count) as RowOverflowPages,
sum(row_count) as Rows
FROM sys.dm_db_partition_stats
GROUP BY object_id,index_id

GO

posted @ 2008-10-26 18:28  new 维生素C.net()  阅读(343)  评论(0编辑  收藏  举报