Tuesday, January 26, 2021

SQL Server Growth Rate

 SELECT

[database_name] AS "Database",

DATEPART(month,[backup_start_date]) AS "Month",

AVG([backup_size]/1024/1024) AS "Backup Size MB",

AVG([compressed_backup_size]/1024/1024) AS "Compressed Backup Size MB",

AVG([backup_size]/[compressed_backup_size]) AS "Compression Ratio"

FROM msdb.dbo.backupset

WHERE [database_name] = N'eTrace'

AND [type] = 'D'

GROUP BY [database_name],DATEPART(mm,[backup_start_date])

order by 2;

No comments:

Post a Comment