[SQL Server] Taille des fichiers Data
SELECT size / 128.0 as fileSize,
file_id as fileId,
FILEPROPERTY(name, 'SpaceUsed') / 128.0 as fileUsed,
CASE WHEN max_size = -1 OR max_size = 268435456 THEN -1 ELSE max_size / 128 END as fileMaxSize,
CASE WHEN growth = 0 THEN 0 ELSE 1 END as IsAutoGrow,
is_percent_growth as isPercentGrowth,
growth as fileGrowth,
physical_name
FROM sys.master_files WITH (NOLOCK)
WHERE type IN(0,1) AND is_read_only = 0
AND database_id = 16