2

Restore of database 'Configurations_6.2.2.25' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

------------------------------ ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: There is insufficient free space on disk volume 'E:\' to create the database. The database requires 22758293504 additional free bytes, while only 10663624704 bytes are available. (Microsoft.SqlServer.SmoExtended)

I am getting the above error when trying to restore a bak file I was given. It is not an option for the database to be shrunk before creating the bak.

I have 9.99GB free on E:\ and I have 59.7GB free on D:\

How can I change this to point to D:\ instead of E:\? and will changing the disk solve my problem? Thanks

EDIT: Solved my problem. In Restore Database -> File -> I changed the Log file folder path to D:\, then under Options I checked Override

  • What tool are you using to restore? If you're using SMSS, all you need to do is change the "Restore As" file paths under "Options" in the Restore Database dialog. – Philᵀᴹ May 13 '19 at 13:56
  • @Philᵀᴹ - yes I figured it out eventually, thanks – lzzydy May 13 '19 at 14:04
3

Use RESTORE ... WITH MOVE instead of pointing and clicking in the GUI.

First, run RESTORE FILELISTONLY FROM DISK = 'D:\path\file.bak';

You will get output, like:

LogicalName    PhysicalName      ...
-----------    ---------------   ---------
SomeName1      E:\whatever\...
SomeName2      E:\whatever\...

For each LogicalName, add a MOVE clause.

RESTORE DATABASE [Configurations_6.2.2.25] -- terrible name, btw, for multiple reasons
  FROM DISK = 'D:\path\file.bak'
  WITH REPLACE, RECOVERY,
    MOVE 'SomeName1' TO 'D:\wherever\file.mdf',
    MOVE 'SomeName2' TO 'D:\wherever\file.ldf';
1

You can change the destination during the restore using the GUI. There are two options, on the Files page

Option 1.

Check "relocate all files to folder"; This allows you to select specific locations for all the "Data" and all the "Log" files. The choices can be the same or different.

Option 2.

If you have multiple data or log files files, you can put each of them in separate location click the ellipsis "..." in the "restore as" column and put whatever you want there.

Screen Shot

Note that multiple log files are bad see Multiple log files and why they’re bad By: Paul Randal

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.