SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 How to check history of database size month wise?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mazher
Starting Member

Pakistan
2 Posts

Posted - 02/06/2014 :  01:32:45  Show Profile  Reply with Quote
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

India
625 Posts

Posted - 02/06/2014 :  07:19:01  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
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

Edited by - ahmeds08 on 02/06/2014 07:20:30
Go to Top of Page

mazher
Starting Member

Pakistan
2 Posts

Posted - 02/07/2014 :  02:09:20  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000