Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using SQL 2012 Enterprise edition

Following instructions here for restoring a backup:

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.

share|improve this question
up vote 3 down vote accepted

Try to do this with T-SQL:

restore database YourDatabase_NewName
from disk = 'C:\YourDir\YourDatabase.bak'
    move 'YourDataFileName' to 'C:\DataDir\DataFile.mdf',
    move 'YourLogFileName' to 'C:\LogDir\LogFile.ldf'
share|improve this answer
+1 T-SQL is 1000 times better than the GUI. IMHO. – Aaron Bertrand Jul 24 '12 at 18:18
Yes! T-SQL Worked fine - I guess I'm submitting it as a bug to Microsoft. – Dina Jul 24 '12 at 19:47
Worked flawlessly - many thanks, have some upvotes. – Alec Dec 4 '12 at 11:31

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.