2014 相信自己能做的更好

---------------------------------------------------------------------------------------------------------
Everything is possible    Nothing is Impossible     
posts - 53, comments - 135, trackbacks - 0, articles - 22
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

公告

Sql Server2005恢复备份数据库问题-Error:3154

Posted on 2008-07-09 11:15 Arping.Net探索 阅读(...) 评论(...)  编辑 收藏

Sql Server2005恢复备份数据库问题-Error:3154

Sql Server2005恢复备份数据库问题-Error:3154
Sql Server2005恢复备份数据库问题:

问题描述:用Sql Server2005恢复数据库备份文件MyDatabase.BAK,报错如小:

The backup set holds a backup of a database other than the existing 'MyDatabase' database.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154)



解决办法:

1.新建一个同名数据库MyDatabase

2.执行下面的sql语句:
restore database MyDatabase from disk = 'C:\MyDatabaseBackup\MyDatabase.BAK'

with replace;