테이블 별 용량 확인
select t_name = convert(varchar(30), min(o.name)), T_sz = ltrim(str(sum(reserved) * 8192 / 1024 / 1024.,15,0) + ‘MB’) from sysindexes i inner join sysobjects o on (o.id = i.id) where i.indid in (0, 1, 255) and o.xtype = ‘U’ group by i.id order by t_name asc
테이블 별 레코드 수
SELECT o.name, i.rows FROM sysindexes i INNER JOIN sysobjects o ON i.id = o.id WHERE i.indid < 2 AND o.xtype = ‘U’ ORDER BY o.name