sql2008 "Database backup in Backup set differs from existing XX database" workaround

Source: Internet
Author: User
Tags mssql mssqlserver name database

sql2008 "Database backup in Backup set differs from existing XX database" workaround

Because it is in another computer to the same name database backup, using the usual method to restore, prompt is not the same database, do not let restore, find the following method on the Internet to solve:

First, right-click the system database master, new query

Execute the following SQL code:

RESTORE DATABASE xxxfrom DISK = ' E:\DB\yyy.bak '   --bak file path with Replace,move ' yyy ' to ' C:\Program Files\Microsoft SQL Se Rver\mssql10_50.mssqlserver\mssql\data\xxx.mdf ',   --mdf file path move ' yyy_log ' to ' C:\Program Files\Microsoft SQL Server\mssql10_50.mssqlserver\mssql\data\xxx.ldf '   --ldf file path

Note: XXX is the name of the database you need to restore, YYY is the backup file you need to restore.

This type of prompt message appears when you execute successfully:

344 pages have been processed for database ' xxx ', file ' yyy ' (located on file 1).
3 pages have been processed for database ' xxx ', file ' Yyy_log ' (located on file 1).
The RESTORE DATABASE successfully processed 347 pages and took 0.045 seconds (60.134 MB/s).

Second, the above method after successful execution, only some of the table structure has been restored, and there is no data in the table, then you can use the system default method and then use the Xxx.bak file to restore the database once you are done, you must select the overwrite restore OH.

sql2008 "Database backup in Backup set differs from existing XX database" workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.