http://stackoverflow.com/questions/7892334/get-size-of-all-tables-in-database SELECT t.NAME AS TableName, s.Name AS SchemaName, p.rows AS RowCounts, AS TotalSpaceKB, AS UsedSpaceKB, ( AS UnusedSpaceKB FROM sys.tables t INNER JOIN sys.indexes i ON t.O…