标签:
查询数据库中所有表的大小,哪些表的数据量较大
create table #t (name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20)) exec sp_MSforeachtable "insert into #t exec sp_spaceused ‘?‘" select SUBSTRING(t.reserved, 0, CHARINDEX(‘KB‘, t.reserved)-1), * from #t t order by cast(SUBSTRING(t.reserved, 0, CHARINDEX(‘KB‘, t.reserved)-1) as int) desc drop table #t
SqlServer数据文件增长也很快,到底是哪些表增长造成的呢?
标签:
原文地址:http://www.cnblogs.com/zhaoguan_wang/p/4816726.html