Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

SQL Server Error 3154

Olivia Rhye

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 
dbnameFROM DISK = 'C:\dbname.bak'WITH REPLACE

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy