还原出错:the backup set holds a backup of a database other than the existing,

mssql server 2005还原出错:the backup set holds a backup of a database other than the existing,error:3154

特别是,导入外面的数据时,可能mdf或ldf的路径与本机的不一样,导致用界面操作无法导入。此时建议用命令导入:

restore database Test
from disk = 'C:\share\20120111TestDB.bak'
with replace,
move 'Test' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf',
move 'Test_log' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test_log.ldf'

猜你喜欢

转载自cai-bird.iteye.com/blog/1341433