Restoring Database Fails

A vendor has sent me several databases and all of them restore fine except for one. I get a message that the MDF file is claimed by secondary and primary. That the MOVE CLAUSE can be used to move one or more files. Has anyone come across this issue before?
more ▼

asked Jun 28, 2011 at 09:12 PM in Default

sqlnubi gravatar image

983 7 10 12

Are you using the SSMS GUI to do the restore?
Jun 28, 2011 at 09:13 PM Tim
Yes I am, SSMS 2008.
Jun 28, 2011 at 09:13 PM sqlnubi
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first
Once you have chosen the file to restore, named the database and checked the box to restore, you need to click on options in the top left. From here you can expand out the path to the physical files. You will see that you have multiple data files. The error message above eludes to that as well. When you expand the path out you should see that both the primary and secondary files defaulted to the same name. You can change the name of either one and then successfully restore the database.
more ▼

answered Jun 28, 2011 at 09:15 PM

Tim gravatar image

36.4k 38 41 139

Thanks, that worked. I kinda feel like I should have known that.
Jun 29, 2011 at 04:38 AM sqlnubi
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jun 28, 2011 at 09:12 PM

Seen: 1332 times

Last Updated: Jun 28, 2011 at 09:12 PM