Size of files within backup?

  • I have a 13GB bak file from a customer with their database (should be a single mdf and ldf within). When I try restoring it it tells me I need over 183 GB free, which naturally I have nowhere near. How is this possible? If it's a good backup file I suspect the log file is the issue. Is there anyway I can extract just the mdf from the bak, or view the bak's contents to find out?

  • Run RESTORE FILELISTONLY on the file e.g.

    RESTORE FILELISTONLY FROM DISK = ' '

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

  • The bak file only contains the data pages which are used. But when you restore it, the mdf and the ldf file are recreated with the size they had at the moment the backup was taken. If the database contains a lot of unused pages, the database needs a lot more space than the backup.

    I don't think there is a way to restore only the used pages. Only option I see is to ask you customer to shrink the database (files) before taking the backup.

    [font="Verdana"]Markus Bohse[/font]

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

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