EXEC sp_MSforeachtable @command1="DBCC UPDATEUSAGE('tempdb','?') WITH count_rows", @command2="sp_spaceused '?'" sp_MSforeachdb有类似的用法