Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 How to check history of database size month wise?

Author  Topic 

mazher
Starting Member

2 Posts

Posted - 2014-02-06 : 01:32:45
I have created a database in Dec, 2012 now the size of database is 1 TB. Now we want to add more resources but before this we want to know that last 1 year what is the size of DB in each month.

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-02-06 : 07:19:01
If you are performing regular backups,this might give the database backup sizes moth wise
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] = ''
AND [type] = 'D'
GROUP BY [database_name],DATEPART(mm,[backup_start_date]);

Also check this one:
http://www.sqlservercentral.com/Forums/Topic493130-146-1.aspx
Javeed Ahmed
Go to Top of Page

mazher
Starting Member

2 Posts

Posted - 2014-02-07 : 02:09:20
Thanks ahmeds08. i have found a better script please visit at http://gallery.technet.microsoft.com/scriptcenter/f1df9f50-9cd9-4c75-a8d9-e2faba6b8574
Go to Top of Page
   

- Advertisement -