Previous Article Next Article MSSQL 備份還原 (續) 完整備份與交易日誌備份
Posted in Database

MSSQL 備份還原 (續) 完整備份與交易日誌備份

MSSQL 備份還原 (續) 完整備份與交易日誌備份 Posted on 2008 年 11 月 11 日Leave a comment

續: http://ssorc.tw/?p=917

完整備份 與 交易日誌備份的還原測試

restore database cross_db from cross_device  with norecovery
restore log cross_db from cross_log_device with file = 1 , norecovery
restore log cross_db from cross_log_device with file = 2 , norecovery
restore log cross_db from cross_log_device with file = 3, recovery

整完備份 與 交易日誌備份的還原到某個時間點方式

restore database cross_db from cross_device  with norecovery
restore log cross_db from cross_log_device with file = 1 , norecovery
restore log cross_db from cross_log_device with file = 2 , norecovery
restore log cross_db from cross_log_device with file = 3, recovery, stopat = Jun 3, 2000 4:53 PM

ps: 檢查交易日誌的時間範圍

restore headeronly from cross_log_device

ps: 如果還原模式是 simple 是無法備份日誌,必需修改為 full 模式

alter database cross_db set recovery full

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *