确定如果要还原差异备份,那么在执行还原全备份时候一定要 norecovery,如果选择的是recovery,那么会出现错误:The log or differential backup cannot be restored because no files are ready to rollforward.
recovery status : Leave the database non-operational, and do not roll back uncommitted transactions.Additional transaction logs can be restored(RESTORED WITH NORECOVERY)
2.还原差异备份: 按上面步骤执行, 在recovery status : Leave the databse ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored(RESTOR WITH RECOVERY)
不过在还原的时候,差异备份不能还原,不知道什么原因。3219错误
执行语句还原没有问题:
restore database [name] to disk='全备份' with norecovery;
restore database [name] to disk='差异备份' with recovery;
-- 在服务器 a 上执行完全备份backup database dbname to disk='d:\db.bak';restore database dbname from disk='e:\db.bak' with file=1, norecovery; -- 在服务器 a 上执行差异备份(追加到“完全备份”后)backup database