SQL Server error 3154: the backup set holds a backup of a database other than the existing database
Resolved SQL
NY
Nora Young
November 21, 2026
4 replies
150 views
Reviewed by moderators
3 participants

I try to restore a backup over an existing database and get error 3154 backup set holds a backup of a database other than the existing database.

Accepted answer
Marked as the solution to this question

This error appears when the database name or files in the backup do not match the database you restore over. Options:

1. Restore to a new database name. In SSMS choose Restore Database, select the backup and type a new target name.
2. If you want to replace the existing database, use Options and select Overwrite the existing database (WITH REPLACE).
3. Check the file paths on the Files page. Use Relocate all files if the paths do not exist on the server.

Take a backup of the current database first if it holds data you need.

WITH REPLACE and corrected file paths solved it. Thanks.

Always check the logical names on the Files page before restoring.

Yes.