Home >

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing

3. March 2011

Yes many times, when restoring database we get this error, this is due to "restore a database on another database which are not the same database. For example, you have backup Northwind database and try to restore the backup to AdventureWorks database, the error will occur."

SQL Error

How to solve this ?

 

Simple solution:

On Restore Database, select Options tab on the left menu. Then, check Overwrite the existing database on Restore options.
Note: This option will overwrite any existing data on the targeted database.

 SQL

Try to restore the database, the problem should be gone now.

SQL ok

Note: you can also delete the targeted database before perform restore a database. This way also gives the result as same as the solution above.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading