1、
select object_name(id),rowcnt from sysindexeswhere indid<2 and objectproperty(id,'ismsshipped')=0 order by rowcnt desc
objectproperty(id,'ismsshipped')=0去掉了mssqlserver系统表
2、sp_spaceused;可以写一个procedure循环调用sp_spaceused统计表的空间占用情况