Home > CRM, SQL > SqlError: The backup set holds a backup of a database other than the existing database

SqlError: The backup set holds a backup of a database other than the existing database

I got below error, when I was trying restore a database from Azure Blob Storage to my local SQL server using ‘SQL Server Management Studio (SSMS)’.

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing ‘{DB_Name}’ database. (Microsoft.SqlServer.SmoExtended)

Reason:

  • I created a new Database (DB) first and tried to restore the DB from Azure blob to this new DB.

Fix:

Below approach solved the issue

  • Don’t create a new Database before hand.
  • Right click ‘Databases’ and select ‘Restore Database’
  • Pick your ‘Source’ Database
  • In the ‘Destination’ section, provide a new Database name as highlighted below

DB_Restore1

  • Click ‘OK’ to complete the Restore process.

If you want to create a Blank Database first and restore.

  • Set below settings in ‘Options’ tab of ‘Restore Database’ window

DB_Restore2

  • Pick existing Database
  • Click ‘OK’ to complete the Restore process.

🙂

Advertisement
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: