declare tables cursor for select name from sysobjects where xtype = ‘U’;
declare @table nvarchar(255);
open tables
fetch next FROM tables into @table
while @@fetch_status = 0
begin
exec sp_spaceused @table;
fetch next FROM tables into @table
end
close tables;
DEALLOCATE tables;