msSQL Server 2008 R2 - Restore Failed

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:

  1. Click on the Options page.
  2. 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.
    1. Before
      1. Restore Database msSQL
    2. After
      1. Restore Database msSQL
  3. Click OK

Viola!  Your database should now successfully restore 🙂

9 thoughts on “msSQL Server 2008 R2 - Restore Failed

  1. Sarawut

    Thank to Jack Stromberg
    I'm in thailand and I try to use way as your suggest after that it successfull.

    Thank you very much
    Sarawut N.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *