Saturday 14 May 2011

SQL Server Error 3154: The backup set holds a backup of a database other than the existing database.


Error 3154: The backup set holds a backup of a database other than the existing database.
Solution is very simple and not as difficult as he was thinking. He was trying to restore the database on another existing active database.
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.
3) Example :
RESTORE DATABASE AdventureWorks
    FROM DISK = 'C:BackupAdventureworks.bak'
            WITH REPLACE

If this doesnt work then you may need to do one of the following:
1.  open up SQL Server Configuration Manager (I am using SQL Server 2005)
2.  right click on SQL Sever Express (I assume it is the same for the full version of SQL Server)
3.  Choose Properties
4.   in the Logon tab - click the built in account radio button and choose 'Local system' from the drop down.


FROM DISK = 'd:myfolderTEST_FullBackup_20090823_2200.bak'
WITH REPLACE

OR

RESTORE DATABASE db_Test
FROM DISK = 'C:Documentsdb_Test_FullBackup_20090624_1737.bak'
WITH REPLACE

No comments:

Post a Comment