我正在使用以下命令将 SQL Server 2005 数据库还原到 SQL Server 2008 R2 实例:
RESTORE DATABASE SampleDB FROM DISK= 'C:\SampleProject\SampleDB.bak' WITH REPLACE,
MOVE 'sampledb' TO
'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\SampleDB.mdf',
MOVE 'sampledb_log'
TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\SampleDB_log.ldf',
CONTINUE_AFTER_ERROR, STATS = 10;
输出是:
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
100 percent processed.
Msg 3242, Level 16, State 2, Line 3
The file on device 'C:\SampleProject\SampleDB.bak' is not a valid Microsoft Tape Format backup set.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
为什么处理的百分比达到100%,然后异常终止?
即使数据损坏,如何恢复此数据库备份?错误后继续似乎没有任何区别。