SQL-Server: The backup set holds a backup of a database other than the existing

前端 未结 24 1790
天命终不由人
天命终不由人 2020-12-07 06:49

I am trying to restore a SQL Server backup file for my database, but it is throwing an error as follow:

The backup set holds a backup of a database ot

24条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 07:08

    system.data.sqlclient.sqlerror:The backup set holds a backup of a database other than the existing 'Dbname' database

    I have came across to find soultion

    1. Don't Create a database with the same name or different database name !Important.

    2. right click the database | Tasks > Restore > Database

    3. Under "Source for restore" select "From Device"

    4. Select .bak file

    5. Select the check box for the database in the gridview below

    6. To DataBase: "Here You can type New Database Name" (Ex:DemoDB)

    7. Don't select the Existing Database From DropDownlist

    8. Now Click on Ok Button ,it will create a new Databse and restore all data from your .bak file .

    you can get help from this link even

    Hope it will help to sort out your issue...

提交回复
热议问题