As a DBA, you may want to know the evolution, in time, of your databases size. To do so, you just need to execute the following script, after having changed ‘databaseName’ with your database’s name. This script won’t look for the actual database size but for the backup size, which is a very good indicator. It’s good to note that only full backups are logged in this table, so, if you have a full backup every night and 4 differential scattered through the day, only the full backup will be logged.
Select backup_start_date, SizeInMegs=floor(backup_size/1024000) from msdb..backupset where database_name = 'DatabaseName' and type = 'd' order by backup_start_date asc
Other interesting SQL posts :
Other popular posts
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.