When you restore a database from another device and run into an error such as: System.Data.SqlClient.SqlError: File 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\salon.mdf' is claimed by 'salon_1'(1) and 'salon_Data'(2). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)
You need to look under options and make sure that the SQL server is not trying to output to the same file name. The problem was due to the rows under the column "Restore As" (under options tab) having the same file name. So in other words, simply change the value of the column name for the "Restore As" to unique MDF values, and the restore should be successful.
Monday, May 11, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment