본문 바로가기

...

[MSSQL] Table 별 용량 확인 Query

반응형

 

 

select top 20
        table_name = convert(varchar(30), min(o.name)),
        table_size = convert(int, ltrim(str(sum(reserved) * 8.192 / 1024., 15, 0))), UNIT = '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 2 desc

 

 

'...' 카테고리의 다른 글

[MSSQL] Shrink transaction log  (0) 2024.09.03
[Windows] CMD로 방화벽 정책 등록  (0) 2024.08.30
[Windows] RDP Port 변경  (0) 2024.08.28