MS SQL Server DB 사용량, Table Size
--사용량 체크 USE [DB_Name] select 'DB_Size' Gubun, sum(size)/128 Size_MB from sys.database_files where [type] in ( 0, 2, 4 ) union all select 'LOG_Size', sum(size)/128 from sys.database_files where [type] in ( 1,3 ) union all select 'SpaceUsed', sum(total_pages)/128 from sys.allocation_units -- Table Size select max(b.name) TableName ,cast((sum(a.reserved) * 8192.0 / 1024 ) as numeric(18,0)) TableSi..
DataBase/SQL Server
2021. 1. 4. 16:07