Is there anyway so that we can estimated/know size of database using backup file without restoring it?

  • 1
    What database are you using (Oracle, SQL Server, MySQL, etc.)? What sort of backup do you have? For some types of backups the size of the backup is going to be roughly equivalent to the size of the restored database. – Justin Cave Apr 4 '14 at 5:48
  • Apologies.. I should have mentioned it earlier.. I am using SQL Server 2008 R2, I am trying to fetch this info from a full backup – Ashish Apr 4 '14 at 5:49
  • Do you use compression of backup? – levitologista Apr 4 '14 at 5:53
  • @levitologista Not sure how that's relevant - the size of a compressed backup (or an uncompressed backup) may or may not have any bearing whatsoever on the actual size of the data files, because they could be any % full (and a backup only backs up pages with data on them). The only thing the compressed backup size will tell you is that your database is at least that big. – Aaron Bertrand Apr 4 '14 at 19:09

Yes, there is, though you got to use RESTORE command anyway. Instead of RESTORE DATABASE, use RESTORE FILELISTONLY to get a detailed view of files in the backup. The Size column tells the file size in bytes.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.