数据库维护相关
(1)SQL Server 查看数据表使用空间
exec sp_spaceused '表名'
(2)SQL Server 数据表使用空间排序
exec sp_MSForeachTable
@precommand=N' create table ##( table_name sysname, records int, save_space Nvarchar(10), use_space varchar(10), index_space varchar(10), free_space varchar(10))', @command1=N'insert ## exec sp_spaceused ''?''', @postcommand=N'select top 10 * from ## order by use_space desc drop table ##'