Symptom: When restoring a database in Microsoft SQL Server Management Studio, you receive the following dialog box similar to something below:
Restore failed for Server 'myserver'. (Microsoft SqlServer.SmoExtended)
Additional Information
System.Data.SqlClient.SqlError: File 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mydatabase.mdf' is claimed by 'mydatabase_FG1'(3) and 'mydatabase'(1). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)
Solution: On the Restore Database - mydatabase window inside of Microsoft SQL Server Management Studio:
- Click on the Options page.
- Underneath Restore the database files as: label, make sure all of the "Restore As" values are unique. In this case, I renamed each *.mdf file to it's "Original File Name" column value.
- Click OK
Viola! Your database should now successfully restore 🙂