I'm trying to restore a database from 32MB backup. I have 6GB available on my disk. When I'm trying to restore the backup it shows the insufficient disk space error. How is it possible that a 32MB backup requires more than 6GB of disk space?
Probably because the backup is compressed, or because there is a very large log file that doesn't need to be part of the backup itself, or because the data file itself has been cleaned out - the backup is only comprised of pages that contain data. But when restored, it still has to expand the data file to its original size, even if most of it is empty.
Show us what the size column says when you run:
RESTORE FILELISTONLY FROM DISK = '[path]\whatever.bak';
I had the same issue, I had a 800 MB database backup file which needed 320 GB free space to be restored in destination computer.
Turned out it was just because of database log file, to make sure log file is what caused the matter, right click on intended databse and click on properties, after that in General
tab check Size
of the database, if it's huge, go to the Files
tab and navigate to the path of tfiles.
I ran Shrink
command on database and on files through interface but it didn't help, following query saved me eventually:
ALTER DATABASE DataBase_Name SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE(DataBase_Name_log, 200);
GO
ALTER DATABASE DataBase_Name SET RECOVERY FULL;
GO
It means you have to run query on the database, then create a back file once again.
NB: As you see in the query above, Database recovery mode should be on Simple
before SHRINKFILE
be executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With