Wednesday, February 24, 2010

fixed my "Restore failed...The file cannot be overwritten. It is being used by database..." error

The "Database -> Restore Database... -> Options pane -> Restore the database files as" file names in the "Restore As" fields were not "Test1Copy1" as entered into the "General pane -> Destination for restore -> To database" field as the database restore destination. The file names were in fact "Test1," the same name of the "General pane -> Destination for restore -> From database" field. Basically, the file names should be Test1Copy1, but for some reason default to Test1.

The... error is resolved by clicking into the "Options pane -> Restore the database files as" file names in the Restore As fields and manually changing the file names...

FROM: Test1.mdf
TO: Test1Copy1.mdf

and

FROM: Test1_log.ldf
TO: Test1Copy1_log.ldf

This could be a SQL Server Management Studio bug, but it is just as likely a misunderstanding by a user who is just realizing he not only doesn't know his @ss from a hole in the ground; he didn't even know there was a hole in the ground ;-)

<%= Clinton Gallagher

Slightly scathing at the very end, Clinton Gallagher, very sneaky, but I do appreciate the apparent concern for my virgin eyes and for the bug fix :-P

http://www.sqlnewsgroups.net/group/microsoft.public.sqlserver.server/topic12008.aspx