An easy way to track the growth of your database
Create Proc GTrack (@DBName varchar(40))
AS
Select @DBName as [Growth Track of database]
Select BackupDate = convert(varchar(10),backup_start_date, 111) ,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where database_name = @DBName and type ='d'
order by backup_start_date desc
--EXEC GTrack 'PUBS'
Select @DBName as [Growth Track of database]
Select BackupDate = convert(varchar(10),backup_start_date, 111) ,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where database_name = @DBName and type ='d'
order by backup_start_date desc
--EXEC GTrack 'PUBS'
No comments:
Post a Comment