我的問題與this post非常相似。DB2-從另一臺服務器恢復
我嘗試了無數組合無濟於事。在ServerA上,我創建了這個命令備份:
db2 backup db mydb user myuser using mypass online to
c:\db-backup\local include logs without prompting
我再複製該文件到服務器B,跑到:
db2 => restore database mydb user myuser using mypass from C:\
TAKEN AT 20151001060002 logtarget C:\DB2\NODE0000\LOGS replace
existing without prompting
我對如何妥善處理LOGTARGET不確定性,以及該命令的結果是這樣的警告:
SQL2540W Restore is successful, however a warning "2523" was
encountere during Database Restore while processing in No Interrupt
mode.
我上的警告讀了,它似乎適合我在做什麼:
SQL2523W Warning! Restoring to an existing database that is different
from the database on the backup image, but have matching names. (more)
然後我跑了這一點:
db2 => rollforward database mydb user myuser using mypass to end of
logs and stop
而且收到此:
SQL1268N Roll-forward recovery stopped due to error "1" while
retrieving log file "S0002796.LOG" for database "MYDB" on node "0".
我已經試過各種組合是這樣的:
db2 => restore database mydb user myuser using mypass from C:\ TAKEN
AT 20151001060002 WITHOUT ROLLING FORWARD
,並得到這樣的:
SQL2537N Roll-forward is required following the Restore.
我現在卡住了。任何幫助,將不勝感激。
使用爲mypass結束的 日誌溢出日誌路徑嘗試'前滾mydb數據庫用戶myuser的(C:\ DB2 \ NODE0000 \日誌)'(這裏的希望,這是而不是活動日誌目錄)。 – mustaccio
感謝您的建議,不幸的是我再次得到這個錯誤'SQL1268N前滾恢復因錯誤「1」而停止,同時在節點「0」上檢索數據庫「MYDB」的日誌文件「S0002797.LOG」。 「我提供的日誌路徑只是一個空目錄,它是否需要成爲特定的位置? –
然後添加'noretrieve'選項。爲什麼「C:\ DB2 \ NODE0000 \ LOGS」呢? – mustaccio