看板 Database 關於我們 聯絡資訊
※ 引述《qrtt1 (愚人)》之銘言: : FROM DISK = N'D:\MyDB\MyDB_backup_200711151513.bak' WITH REPLACE : 做了完整備份的回復, 接著使用 : RESTORE DATABASE [MyDB] : FROM DISK = N'D:\MyDB\MyDB_backup_200712140155.bak' WITH NORECOVERY : 執行差異回復時出現了錯誤訊息 後來我發現改成 RESTORE DATABASE [MyDB] FROM DISK = N'D:\MyDB\MyDB_backup_FULL.bak' WITH NORECOVERY, REPLACE 接著 RESTORE DATABASE [MyDB] FROM DISK = N'D:\MyDB\MyDB_backup_DIFF.bak' WITH NORECOVERY 就可以了. 不過我對於 RECOVERY 與 NORECOVERY 的意義不很了解 ============== http://msdn2.microsoft.com/en-us/library/ms186858.aspx #restoring_full_n_differential_db_backups Comparison of RECOVERY and NORECOVERY Roll back is controlled by the RESTORE statement through the [ RECOVERY | NORECOVERY ] options: * NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next statement in the sequence. In this case, the restore sequence can restore other backups and roll them forward. * RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for the current backup. Recovering the database requires that the entire set of data being restored (the roll forward set) is consistent with the database. If the roll forward set has not been rolled forward far enough to be consistent with the database and RECOVERY is specified, the Database Engine issues an error. 不知道我是不是要在最後一個 DIFF 的備份使用 RECOVERY ? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.219.202