Easy way to track the Db Growth.
Many times we would like to know how much the database has grown in the past N days. Though there are many ways of tracking the dbgrowth,the easiest way would be to query the backupset table in the msdb database.
This would give the full backup sizes of the database which is infact the size of the database.
Below is the query that i would use to quickly find out the growth of the database.
select
BackupDate = convert(varchar(10),backup_start_date, 111)
,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where
database_name = 'databasename'
and type = 'd'
order by
backup_start_date desc
I have picked this query from some other blog and now cannot retrace it back to find the name of the author. All the credit goes to the author.
No comments:
Post a Comment