在SQL Server 2008 r2上还原一个SQL Server 2005时,还原不成功,提示如下信息:
按照如下情况则还原成功:
-- 查看备份文件的类型
RESTORE FILELISTONLY
FROM DISK = N'D:\DB\AnyImage.bak' --之后下面写备份文件的查看到的LocalName和最终要存的路径
RESTORE DATABASE AnyImage1
FROM DISK=N'D:\DB\AnyImage.bak'
WITH
MOVE 'AnyImage_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AnyImage1.mdf',
MOVE 'AnyImage_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AnyImage1_log.ldf',
STATS = 10, REPLACE GO