Tuesday, November 17, 2009
If you ever get the above error, you can restore from the query command line, via use of the REPLACE command.

This is illustrated here - http://blog.sqlauthority.com/2007/09/27/sql-server-fix-error-3154-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing-database/

I've copied this fix for my own reference:

Fix/WorkAround/Solution:

1) Use WITH REPLACE while using the RESTORE command. 

2) Delete the older database which is conflicting and restore again using RESTORE command.

I understand my solution is little different than BOL but I use it to fix my database issue successfully.

3) Sample Example :
RESTORE DATABASE AdventureWorks
FROM DISK = 'C:\BackupAdventureworks.bak'
WITH REPLACE


Also, to REPLACE AND MOVE, use the following:

RESTORE DATABASE mydb
FROM DISK = 'C:\Temp\data\mybak.bak'
WITH REPLACE,
MOVE 'original_dat' to 'C:\work\data\data2.mdf',
MOVE 'original_log' to 'C:\work\data\data2.ldf'

Tuesday, November 17, 2009 12:04:07 PM (GMT Standard Time, UTC+00:00) | Comments [0] | Database#
Comments are closed.
Search
Archive
Links
Categories
Admin Login
Sign In
Blogroll