SQL Server Error 3154

Tim Barsness

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

Last updated by on .

What Are Your Thoughts?

Your email address will not be published. Required fields are marked *