파일 그룹
![[MSSQL] 파일 그룹별로 디스크 할당량, 사용량, 할당 가능량 조회 쿼리](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FtbL8T%2FbtrBajp0796%2Fchmglkb235KS6UY2q7Lf6K%2Fimg.png)
[MSSQL] 파일 그룹별로 디스크 할당량, 사용량, 할당 가능량 조회 쿼리
SELECT a.[NAME] as '파일 그룹명' , b.size*8 /1024 as 'PhysicalSize (MB)' ,(b.Size - sum(total_pages))*8/1024 as 'UnAllocationSize (MB) ' , sum(total_pages) * 8 /1024 as 'TotalAllocation (MB)' , sum(used_pages)*8 /1024 as 'UsedAllocation (MB)' , sum(data_pages) *8/1024 as 'DataSize (MB)' , sum(total_pages-used_pages)*8/1024 as 'FreeSize (MB)' FROM SYS.filegroups a with (nolock) INNER JOIN ( SELECT dat..