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. HTML解决div里面img的缝隙问题

    图片IMG与容器下边界之间有空隙怎么办?这里介绍3中简单的解决方法. 第一,给图片img标签display:block. img{display:block} 第二,定义容器里的字体大小为0. div ...

  2. zookeeper 安装

    Zookeeper安装 一.   下载zookeeper http://www.apache.org/dist/zookeeper/stable/ 二.   解压zookeeper.tar >& ...

  3. php基本框架

  4. [转] HTC:html组件

    ~~~不时会看到 用htc实现 hover, border-raius等效果,可以用来弥补IE6-8的不足.那么htc到底是什么呢? 1.摘要 本文在实例的基础上讨论了HTC(HTML Compone ...

  5. Spring基于 Annotation 的简单介绍

    tyle="margin:20px 0px 0px; font-size:14px; line-height:26px; font-family:Arial"> 1.使用 @ ...

  6. redis缓存工具Jedis进行跨jvm加锁(分布式应用)--不幸暂弃用--能够做第三方锁使用

    近期使用redis碰到了多个并发处理同一个缓存的情况.在这样的情况下须要进行加锁机制. 本来想使用java自带的ReadWriteLock进行设置读写锁,这也是上家公司使用的方法. 后来经过商讨,给予 ...

  7. Unity KillCount

    using UnityEngine; using System.Collections; public class KillCountMult : MonoBehaviour { public GUI ...

  8. TCP/IP之TCP交互数据流、成块数据流

    建立在TCP协议上的网络协议有telnet,ssh,ftp,http等等.这些协议根据数据吞吐量来分成两大类: (1)交互数据类型,例如telnet,ssh,这种类型的协议在大多数情况下只是做小流量的 ...

  9. android:music

    package com.terry; import java.io.File; import java.io.FileFilter; import java.io.IOException; impor ...

  10. 微信红包API接口(PHP)

    根据微信高级红包接口,开发PHP版本的API接口,现在进行主要代码分析. 红包接口调用请求代码,所有请求参数为必填参数与文档对应: class Wxapi { private $app_id = 'w ...