locked
4 GB limit -- on 3 GB restore? RRS feed

  • Question

  •  

    I'm trying to restore a database in SQL Express. The backup file, mydb.bak, is 3.1 GB. But when I try to restore it in SQL Express, I get:

     

    "CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database"

     

    OK, I understand about the 4 GB limit... but why am I getting this error with a database that's only 3.1 GB?

    Monday, April 14, 2008 6:10 PM

Answers

  • The .bak size is usually smaller than the database size.

     

    Monday, April 14, 2008 6:38 PM
  • Hello,

     

    A simple precision , please.

    Is it :

    - because during the backup, there is a compression so the size is lower

    - because backup does not backup unused portion of the file ( a datafile may have a size of 4.1 GB but a really used size of 3.1 GB because of automatic growth by step of 1 GB )

     

    Have a nice day

     

    Monday, April 14, 2008 8:26 PM

All replies

  • The .bak size is usually smaller than the database size.

     

    Monday, April 14, 2008 6:38 PM
  • Hello,

     

    A simple precision , please.

    Is it :

    - because during the backup, there is a compression so the size is lower

    - because backup does not backup unused portion of the file ( a datafile may have a size of 4.1 GB but a really used size of 3.1 GB because of automatic growth by step of 1 GB )

     

    Have a nice day

     

    Monday, April 14, 2008 8:26 PM
  • Hi Jesse,

    As said by Papy Normand backup size will be smaller than the data files this is because backup command will backup only the used data's and it won't take unused space from data file.

    Since the backup size is 3GB your source db will also be used for 3GB only, hence shrink the source database to it's minimum(i.e near to 3GB) and then take the backup and restore it in destination. This will surely help you!!!
    Tuesday, April 15, 2008 2:34 AM