SQLServer: create table #t(name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20),spaces int)exec sp_MSforeachtable "insert into #t(name,rows,reserved,data,index_size,unused) exec sp_spaceus…