locked
restoring a database from X to Y RRS feed

  • Question

  • I have a backup of an existing database tha I would like to restore to another database which is newly created (blank)

    but i keep getting the error

    The backup set holds a backup of a database other than the existing (Restore failed)

    any idea

    I have checked he replace option
    • Edited by JonDoe321 Monday, November 5, 2012 2:34 AM
    Monday, November 5, 2012 2:32 AM

Answers

  • Hi JonDoe321,

    Base on the error message, have you checked this blog which describes this error and provides solutions? You can use WITH REPLACE while using the RESTORE command, or delete the older database which is conflicting and restore again using RESTORE command.


    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.



    Ray Chen

    TechNet Community Support


    • Edited by Shulei Chen Wednesday, November 7, 2012 6:57 AM
    • Marked as answer by Shulei Chen Tuesday, November 13, 2012 9:18 AM
    Wednesday, November 7, 2012 6:56 AM

All replies

  • Hi Jon,

    Have you tried deleting the blank DB and tried the restore again?

    Monday, November 5, 2012 2:56 AM
  • you mean delete the mdf file? I tried that but the db will not come back online. if its not online how do I do a restore?
    Monday, November 5, 2012 2:58 AM
  • Hi Jon,

    From SQL Server management studio, right click the blank DB and click delete. (if the old mdf / ldf  files still exist, you may need to rename/delete them)

    Once that has been completed.

    1. Right click the "databases" folder

    2. select "Restore database..."

    3. select "From device" and click "..." and find your backup.

    4. In the "To database:" field, select the name you like to use.

    5. Click OK.


    Monday, November 5, 2012 3:03 AM
  • I think of two possible issues 

    1)  you are trying to restore the database rom highest version to the lowest one

    2) a .bak file contains more than one backup set (issue RESTORE HEADERONLY...... (see details in the BOL)


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog: Large scale of database and data cleansing
    MS SQL Consultants: Improves MS SQL Database Performance

    Monday, November 5, 2012 5:54 AM
  • Hi JonDoe321,

    Base on the error message, have you checked this blog which describes this error and provides solutions? You can use WITH REPLACE while using the RESTORE command, or delete the older database which is conflicting and restore again using RESTORE command.


    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.



    Ray Chen

    TechNet Community Support


    • Edited by Shulei Chen Wednesday, November 7, 2012 6:57 AM
    • Marked as answer by Shulei Chen Tuesday, November 13, 2012 9:18 AM
    Wednesday, November 7, 2012 6:56 AM