) ) if object_id('tempdb..#space') is not null drop table #space ),rows ),data ),index_size ),unused )) declare sp cursor local for select '['+name+']' from sysobjects where type = 'u' open sp fetch sp into @name begin set @sql = 'insert into #space…