One:

he backup set holds a backup of a database other than the existing ‘xxdb’ database

Sometime when you try to restore the backup file on an existing database and receive the following error
message:

Restore failed for Server ‘SQL Server name‘. (Microsoft.SqlServer.Smo)

Additional information:

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing ‘xxdbe‘ database. (Microsoft.SqlServer.Smo)
Above error message indicates that you are going to restore a database on another database which are not the same database. For example, you have backup A database and try to restore the backup to B database,
the error will occur.
You can use the overwrite the existing database option while you’re restoring to solve the problem.
On Restore Database, select Options tab on the left menu. Then, check Overwrite the existing database on Restore options.
Now Restore the database. and problem is solved.
You can also delete the database and again restore that.
Two:
Use SQL to solve this issue.

USEmaster

RESTOREDATABASEReportServer

FROMDISK='C:\Program
Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ReportServer.bak'

WITHMOVE'ReportServer_db'TO'C:\Program
Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ReportServer.mdf',

MOVE'ReportServer_log'TO'C:\Program
Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ReportServer_log.ldf',

STATS=
10,REPLACE

GO

[TroubleShootin]The backup set holds a backup of a database other than the existing 'xxdb' database.的更多相关文章

  1. The backup set holds a backup of a database other than the existing ‘dbName’ database

     [Solved] System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than t ...

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

    还原数据库时报以上错误,解决办法是: 1.删除新建的DB 2.直接右键Databases-->Restore Database 3.在弹出窗口中的To database栏位填写需要新建的DB名称 ...

  3. backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.

    昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示: <Exec>   <ctx>yMaint.ShrinkLog</ctx> ...

  4. (转载)RESTORE DATABASE命令还原SQLServer 2005 数据库

    今天恢复一个SQLServer2008R2,发现问题,然后通过园友的文章解决了问题,特记录备用 原文地址:http://www.cnblogs.com/adandelion/archive/2006/ ...

  5. Sql Server 2008 还原数据库 3154错误

    sqlserver2008还原数据库时出现了3154错误,具体错误信息如下: 错误信息 The backup set holds a backup of a database other than t ...

  6. SQL Server还原和一些小发现

    1.当数据库已经建好在DB里,SQL Server 2005 和 SQL Server 2008使用.Bak文件还原的时候,会出现 error : "The backup set holds ...

  7. sqlserver备份还原数据库时报占用错误

    .做项目时遇到这种情形:原来的test_dev数据库,想复制出test_ft供测试用.此时备份test_dev出test_backup文件,想直接还原成test_ft时会报占用错误. 还原数据库:Th ...

  8. RESTORE DATABASE命令还原SQLServer 数据库 bak

    今天在sqlServer20005 的management studio里使用bak文件还原数据库的时候,总是失败!Restore failed for Server 'ADANDELI'.  (Mi ...

  9. Get Error when restoring database in Sql Server 2008 R2

         When I restored a database I got an error: "The backup set holds a backup of a database ot ...

随机推荐

  1. Tortoisegit 记住用户名和密码

    Tortoisegit 记住用户名和密码方法: [Windows系统] 当你配置好git后,在 C:\Documents and Settings\Administrator\ 目录下有一个  .gi ...

  2. iframe,modaldialog父子窗口相互通信的问题

    --- 子窗口访问父窗口的window对象 --- 打开新窗口一般有几种方法,window.open(...),window.showModalDialog(...),以及iframe中嵌套页面,另外 ...

  3. Mac编程(QT有许多专门的资料)

    Mac OS X 上在应用运行时,在Dock上的图标右键会有额外的菜单部分.参考iTunes运行时右键的菜单.使用Qt在Mac下的一个set_menu(QMenu *)函数实现,文档里有写 http: ...

  4. XPath与多线程爬虫

    XPath是一门在xml中查询信息的语言安装使用XPath 1.安装lxml库 window:pip install lxmllinux:sudo pip install lxml国内安装缓慢,建议到 ...

  5. jQuery Ajax异步处理Json数据详解

    先我们来看一个官方的实例使用 AJAX 请求来获得 JSON 数据,并输出结果: $("button").click(function(){ $.getJSON("dem ...

  6. android 破解九宫格

    将目录切换到D:/adb目录下,命令如下 敲入命令 adb shell 然后回车,可以见到如下结果 再敲入命令cd /data/system然后回车, 再执行 rm gesture.key 回车,搞定 ...

  7. Android 开机动画源码分析

    Android系统在启动SystemServer进程时,通过两个阶段来启动系统所有服务,在第一阶段启动本地服务,如SurfaceFlinger,SensorService等,在第二阶段则启动一系列的J ...

  8. iOS中 视频直播功能-流媒体的使用

    简单介绍: HLS 协议 : >5M会被AppStore拒绝  服务器要求低   延迟高    多平台   RTMP 协议:  电视直播   PC端使用    配合flash插件  及时性好  ...

  9. 10_9 java笔记

    java中所有的关键字都是小写的注意main虽然被编译器识别,但是它并不是关键字包:(名字小写) 单级包:liyi 多级包:cn.itcast path 和classpath的区别:path环境变量里 ...

  10. linux脚本:ftp自动传输文件

    使用Shell脚本实现ftp的自动上传下载 http://liwenge.iteye.com/blog/566515 open 192.168.1.171 user guest 123456cd /h ...