SQL Server Error 3154

July 16, 2009

I ran accross the SQL Server error 3154. In SQL Server 2008, it says “Restore Failed for Server ‘ServerName\InstanceName'” Additional Information: “System.Data.SQLClient.SqlError: The backup set holds a backup of a database other than the existing ‘dbname’ database. (Microsoft.SqlServer.Smo)”

Solution:

Use WITH REPLACE.  This can be found in the GUI tool or done in T-SQL as follows:

RESTORE DATABASE dbname
FROM DISK = 'C:\dbname.bak'
WITH REPLACE

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive