我试图恢复我的数据库的SQL Server备份文件,但它抛出一个错误如下:

备份集保存现有数据库以外的数据库的备份

我的数据库是SQL Server 2008,备份文件是2005年的。

会有什么问题呢?


当前回答

我今天遇到了类似的问题。尝试了以上所有的解决方案,但都没有效果。把我的解写在这里。

在恢复之前,不要忘记取消选择尾长备份

希望它也能帮助到其他人!

其他回答

而不是点击恢复数据库点击恢复文件和文件组..

这在我的SQL服务器上工作

这帮助我从系统驱动器导入备份文件

Create a database with the same name(preferably) as your .bak file database name Right click the database > Tasks > Restore > Database Under "Source for restore" select "From Device" Select the .bak file selecting the path from the system Select the check box for the database in the list box below Under "Select a Page" on the right Select "Options" Select the checkbox labeled "Preserve the replication settings(WITH KEEP_REPLICATION) Select the checkbox for Overwrite the existing database(WITH REPLACE) Now Go back to the General page and click OK to restore the database...

我也有同样的问题,但在PS上。我把它留在这里,以防有人试图做同样的事情

Restore-SqlDatabase -ServerInstance "<your instance name>" -Database "<your db name>" -BackupFile "<backup file route>.bak" -ReplaceDatabase

记住使用Set-ExecutionPolicy Unrestricted -Force和import import-module sqlps。完成后,不要忘记将执行策略设置为受限。

首先创建一个同名的空白数据库。然后选择恢复选项

在左侧窗格的选项下,不要忘记选择

覆盖现有数据库 保留复制设置

就是这样

我只是想解决这个问题。

从以管理员身份运行到这里和其他地方找到的建议,我尝试了所有方法;为我解决这个问题的是在文件属性选项卡中检查“重新安置文件”选项。

希望这能帮助到其他人。