9

Is there a way to know the size of a database full backup file before we actually do the backup? I did some analyses and figured sp_spaceused could give a close figure but thats not all, there seem(s) to be one/more factors other than the used space that go into determining the size?

Has anyone been down this path before? Any ideas?

2
  • I am looking for a more specific answer. I checked the AdventureWorksDB bak size and the MDF and LDF sizes. That did not add up correctly. i.e. the bak = 164,755 KB ; MDF = 180,992 KB and LDF = 2048 KB. Commented May 14, 2009 at 11:16
  • As an aside, according to serverfault.com/a/484672/82769, an MS SQL compressed backup will typically be ~30% smaller than uncompressed. Commented Aug 1, 2014 at 22:24

2 Answers 2

8

sp_spaceused should be pretty close if you look at the reserved space.

Estimating the Size of your Database Backups

Paul Randal blogged recently about how to know how large your TLOG backup might be:

How much data will the next log backup include

A combination of the two values, seems to be really close to the actual backup size in some brief testing.

Sign up to request clarification or add additional context in comments.

2 Comments

thank you, I have reached thus far. Is it possible to get any further?
In retesting this, the numbers are only a few KB off in size from the actual backup that is taken I don't know how much closer to accurate you are expecting to get?
0

It's pretty much the size of the mdf and ldf files.

1 Comment

This isn't correct since data files have free space that is not backed up. You can test this by creating a 4GB database and then doing a backup. The backup will be nowhere near 4GB in size.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.