backup file has incorrect size

  • I ran into a situation where I couldn't restore a SQL Server backup file because it indicated there was not enough disk space. This is because the backup file was created after the database had been trimmed & shrunken from about 8GB to 4GB. You could see this size value when you run RESTORE FILELISTONLY FROM DISK = 'h:path'. My questions are:

    1. How do you update that parameter? By running DBCC updateusage or sp_updatestats before making the backup?

    2. Once you make the backup, is there any way to change the size parameter on a backup file so that you are not forced to free up 8GB when you only need 4GB?

    Thanks.


    smv929

  • One more bit of information about my scenario: I used a script to restore the database, which would create the database and then restore it. Perhaps if I had used EM to create a new database first and then restore it using either EM or the script, SQLSrvr would have restored it. Or would it still stop because the computer lacked the disk space specified within the backup file?


    smv929

  • If you backup a database that has 4GB of data and 4GB of space, you will still require 8GB free to restore this database.

    As far as I know you cannot change the size in the backup file.

    You should shrink the database, back it up, then restore it to the new location.

    You do not need to create the database first.  Your script that creates the database and restores it would be fine.

    Cheers,

    Angela

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply