如何查看sql server存储空间占用

2025-04-06 04:05:09
推荐回答(1个)
回答1:

查看当前库里面每个表空间的占用情况
select object_name(id) tablename,8*reserved/1024 reserved,rtrim(8*dpages/1024)+'Mb' used,8*(reserved-dpages)/1024 unused,8*dpages/1024-rows/1024*minlen/1024 free,
rows,* from sysindexes
where indid=1
order by reserved desc