SQL-Server:备份集保存了一个数据库的备份,而不是现有的 [英] SQL-Server: The backup set holds a backup of a database other than the existing

查看:33
本文介绍了SQL-Server:备份集保存了一个数据库的备份,而不是现有的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的数据库恢复 SQL Server 备份文件,但它抛出如下错误:

I am trying to restore a SQL Server backup file for my database, but it is throwing an error as follow:

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

The backup set holds a backup of a database other than the existing

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

My database in SQL Server 2008 and the backup file is in 2005.

可能是什么问题?

推荐答案

我也遇到了这个问题.

解决方案:

  • 不要创建一个空的数据库并将 .bak 文件恢复到它上面.
  • 使用恢复数据库"选项,可通过右键单击 SQL Server Management Studio 的数据库"分支访问并提供数据库名称,同时提供要恢复的源.
  • 如果另一个数据库仍然存在,还要更改文件"中的文件名.否则你会得到文件'...'不能被覆盖.它正在被数据库'yourFirstDb'使用".
  • Don't create an empty database and restore the .bak file on to it.
  • Use 'Restore Database' option accessible by right clicking the "Databases" branch of the SQL Server Management Studio and provide the database name while providing the source to restore.
  • Also change the file names at "Files" if the other database still exists. Otherwise you get "The file '...' cannot be overwritten. It is being used by database 'yourFirstDb'".

这篇关于SQL-Server:备份集保存了一个数据库的备份,而不是现有的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆