--exec sp_MSforeachtable 'print ''?'' exec sp_spaceused ''?''' if OBJECT_ID('tempdb..#TablesSizes') IS NOT NULL drop table #TablesSizes create table #TablesSizes (TableName sysname, Rows bigint, reserved varchar(100), data varchar(100), index_size varchar(100), unused varchar(100)) declare @sql varchar(max) select @sql = coalesce(@sql,'') + ' insert into #TablesSizes execute sp_spaceused ' + QUOTENAME(Table_Name,'''') from INFORMATION_SCHEMA.TABLES --print (@SQL) execute (@SQL) select * from #TablesSizes order by TableNameusing the ideas from http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/how-to-get-information-about-all-databas