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/