还原数据库:The backup set holds a backup of a database other than the existing database

来源:互联网 发布:linux ssh远程登录命令 编辑:程序博客网 时间:2024/05/16 23:42

查了好长时间资料才搞定这个问题。

使用SQL Server Management Studio的向导方式为新建的DB执行From Device Restore时,出现错误讯息:“The backup set holds a backup of a database other than the existing database”,使用以下方法解决:

1、删除新建的DB

2、直接右键Databases-->Restore Database


3、在弹出窗口中的To database栏位填写需要新建的DB名称(不存的名称)

4、选择From Device

5、选择DB的.bak备份文件

完成!

PS:至今不知道“先建DB然后再还原这种常用方式”总是报错的原因,但是这两种方式是殊途同归,都可以达到Restore的目的,这种方式是Restore的同时新建一个DB。




原创粉丝点击