Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How can I calculate how much storage I need to store a full backup on all my sql databases

Posted on 2014-12-22
5
Medium Priority
?
54 Views
Last Modified: 2015-06-11
I am preparing to upgrade our ERP system, I have 491 databases to backup before I run the proccess.
Is there a way in SQL to see how much storage is required? We run all of our nightly backups offsite to DR, I am stopping thee backups the few days I am migrating as I would only need a local backup shoudl something not migrate over.

I am needing to know how much disk space I require for a FULL backup  so I may request a dedicated shared location to backup to.

Thank you


Mark
0
Comment
Question by:manelson05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40513218
All databases are in the same instance?
What is the frequency of the Full Backups?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40513227
Assuming you're not using compression then a full backup of a database will be the same size as the size of the allocated extents within the datafiles for each database.

You can use sp_spaceused to view details of the size being used.
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40513253
If your full database backup runs every week then you can know how much space was used in the last backup by running the following query:
USE msdb
GO

SELECT SUM(backup_size/1024/1024) TotalBakSizeMB, SUM(compressed_backup_size/1024/1024) CompressedTotalBakSizeMB
FROM backupset
WHERE type='D'
 AND backup_finish_date=(SELECT MAX(backup_finish_date) 
						FROM backupset bak2
						WHERE bak2.database_name = backupset.database_name AND bak2.type='D')

Open in new window


I added the Compressed Backup Size since I don't know if you are using compressed backups or not. Anyway, if you don't the values should be the same. The results are in MB but you can divide by 1024 to get it in GB.
0
 

Author Comment

by:manelson05
ID: 40513658
All databases are in the same instance, anyway to select all databases.
Databases are uncompressed, we back up every eight hours.
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 40514091
You do a full backup every 8 hours for 491 databases?  Hmm, I'd re-think that strategy.  At the very least you could mix in some differential backups.


>> then a full backup of a database will be the same size as the size of the allocated extents within the datafiles for each database <<

That is not true.  The backup will be smaller since it will not contain control info nor free space from the SQL blocks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question