- 정보공유
[SQL] MSSQL 테이블별 용량 확인.
SELECT table_name = convert(varchar(30), min(o.name))
, table_size = ltrim(str(sum(cast(reserved as bigint)) * 8192 / 1024.,15,0) + 'KB')
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