5

Using SQL 2012 Enterprise edition

Following instructions here for restoring a backup: http://msdn.microsoft.com/en-us/library/ms186390.aspx#Restrictions

I need to be able to rename the database because it is the second copy on the instance (testing purposes). But I cannot rename it nor change the folders that it will restore the MDF/LDF files to.

For whatever reason the "Relocate all files to folder" checkbox is not available.

Restoring form a SQL 2005 backup.

Thomas Stringer
42.5k9 gold badges120 silver badges155 bronze badges
asked Jul 24, 2012 at 18:03

2 Answers 2

5

Try to do this with T-SQL:

restore database YourDatabase_NewName
from disk = 'C:\YourDir\YourDatabase.bak'
with
 move 'YourDataFileName' to 'C:\DataDir\DataFile.mdf',
 move 'YourLogFileName' to 'C:\LogDir\LogFile.ldf'
go
answered Jul 24, 2012 at 18:10
2
  • Yes! T-SQL Worked fine - I guess I'm submitting it as a bug to Microsoft. Commented Jul 24, 2012 at 19:47
  • Worked flawlessly - many thanks, have some upvotes. Commented Dec 4, 2012 at 11:31
4

When you select the "Device" (file) to restore your database from, the Database combobox below is populated and the first item is selected.

But! Whatever event that populates the Files grid is not firing. If you explicitly select your database from that drop down, the Files grid will then populate and the "Relocate all files to folder" checkbox will enable.

answered Jul 24, 2014 at 15:31
1
  • thanks, selecting the "device" a second time properly refreshed the files page Commented Jan 16, 2017 at 21:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.