问题描述:用Sql Server恢复数据库备份文件XXX.BAK,报错如下:
The backup set holds a backup of a database other than the existing'XXX' database.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server,Error: 3154)
解决办法:
1.新建一个同名数据库XXX
2.在其他数据库中执行下面的sql语句:
restore database XXX from disk ='C:\XXX.BAK'
with replace;