Solution for SQL 2008 "database backup in Backup set is different from existing XX database"

Source: Internet
Author: User
Tags microsoft sql server sql 2008 mssql mssqlserver backup

Because it is a backup of a database of the same name on another computer, restore with the normal method, the hint is not the same database, do not let restore, find the following method on the net to solve:

One, right click System Database master, new query

Execute the following SQL code:

RESTORE DATABASE XXX
From DISK = ' E:\DB\xxx.bak ' --bak file path
With Replace,
Move ' xxx ' to ' D:\Program Files\Microsoft SQL Server\mssql10_50.mssqlserver\mssql\data\xxx.mdf ', --mdf file path
Move ' xxx_log ' to ' D:\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, Xxx.bak is the backup file you need to restore.

Second, the above method of successful implementation, only part of the table structure has been restored, and there is no data in the table, then you can use the system default method to restore the database with Xxx.bak file is done, you must select coverage Restore OH.

Third, if the database has NDF files, after the first step, there will be the NDF did not restore the error prompts, the hint has the original path, as long as the path to create a new folder on the line.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/

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.