The database restore wizard in SQL Studio has always been kind of a pain to wade through and get right. Usually the hassle part comes from having to modify the directory path that the backup will be restored to, because the path it was backed up to is different than the one it will be restored to.
Here's a simple two step script that we use to restore backups, regardless of what path they were originally backed up to. First, run this to basically "introspect" the backup that you want to restore. Modify the path so it points to the actual path where your backup file is:
RESTORE FILELISTONLY FROM DISK = N'C:\somewhere\mydb_backup.bak'
GO
That will give you back some results that show you the LogicalName and PhysicalName of the data and log backup files. For the next step, you just need the LogicalName(s). I usually just copy them out of the results and paste them into this script where necessary:
RESTORE DATABASE [mydb] -- name of your newly restored db
FROM DISK = N'C:\somewhere\mydb_backup.bak' -- same as step 1
WITH FILE = 1,
MOVE N'mydb_Data' TO N'C:\somewherenew\mydb.mdf', -- db LogicalName and new db file path/name
MOVE N'mydb_Log' TO N'C:\somewherenew\mydb_1.ldf', -- log LogicalName and new db log path/name
NOUNLOAD,
STATS = 10
GO
That's it. This should cover the most common restore, where you have a backup file that you want to restore and create a new db at the same time.
We have a copy of this script in our team utils directory and just modify the file and db names in it whenever we need to do a restore. No more hunt and pecking through the wizard.
3695edd7-4a59-4c5c-a653-9721f7ed04e2|2|3.0