독까의 이야기

DB 용량 확인

Database/MS-SQL2016. 7. 21. 10:51

use db명
DBCC SHOWFILESTATS
go

--------------------------------------------------------------------------------------------------------------------------------
Fileid      FileGroup   TotalExtents         UsedExtents          Name                        FileName
1          1                 1283379                 113056          PRODUCT_DB        D:\GUNNM.MDF

총 TotalExtents 1283379 / 16 = 80211 -> 80GB
현재 사용 UseExtents 113056 / 16 = 7066 -> 7GB