從磁帶恢復歸檔出現ORA-19870錯誤
從磁帶中直接恢復歸檔日誌時,出現了這個錯誤資訊。
歸檔日誌前後備份了兩次,一次是在備份資料庫後做的,另一次是凌晨7點左右進行的,其中第二次備份包含的歸檔日誌比第一次多,最近的歸檔日誌檔案備份資訊如下:
BS Key Size Device Type Elapsed Time Completion
Time
------- ---------- ----------- ------------ -------------------
37761 3.18G SBT_TAPE 00:01:22
2011-08-27 03:22:37
BP Key: 37761 Status: AVAILABLE Compressed: NO Tag: TAG20110827T032114
Handle: al_43199_1_760245675 Media:
List of Archived Logs in
backup set 37761
Thrd Seq Low SCN
Low Time Next SCN Next Time
---- ------- ----------
------------------- ---------- ---------
1
132214 10200825285755 2011-08-27
00:35:39 10200825450980 2011-08-27 00:40:04
1
132215 10200825450980 2011-08-27
00:40:04 10200825451525 2011-08-27 00:40:06
1
132216 10200825451525 2011-08-27
00:40:06 10200826640012 2011-08-27 01:05:42
1
132217 10200826640012 2011-08-27
01:05:42 10200828085370 2011-08-27 02:08:11
1
132218 10200828085370 2011-08-27
02:08:11 10200831622590 2011-08-27 03:05:09
1
132219 10200831622590 2011-08-27
03:05:09 10200831803462 2011-08-27 03:21:02
1
132220 10200831803462 2011-08-27
03:21:02 10200831803603 2011-08-27 03:21:12
BS Key Size Device Type Elapsed Time Completion
Time
------- ---------- ----------- ------------ -------------------
37763 4.22G SBT_TAPE 00:06:40
2011-08-27 07:12:26
BP Key: 37763 Status: AVAILABLE Compressed: NO Tag: TAG20110827T070545
Handle: al_43201_1_760259146 Media:
List of Archived Logs in
backup set 37763
Thrd Seq Low SCN
Low Time Next SCN Next Time
---- ------- ----------
------------------- ---------- ---------
1
132214 10200825285755 2011-08-27
00:35:39 10200825450980 2011-08-27 00:40:04
1
132215 10200825450980 2011-08-27
00:40:04 10200825451525 2011-08-27 00:40:06
1
132216 10200825451525 2011-08-27
00:40:06 10200826640012 2011-08-27 01:05:42
1
132217 10200826640012 2011-08-27
01:05:42 10200828085370 2011-08-27 02:08:11
1
132218 10200828085370 2011-08-27
02:08:11 10200831622590 2011-08-27 03:05:09
1
132219 10200831622590 2011-08-27
03:05:09 10200831803462 2011-08-27 03:21:02
1
132220 10200831803462 2011-08-27
03:21:02 10200831803603 2011-08-27 03:21:12
1
132221 10200831803603 2011-08-27
03:21:12 10200839298501 2011-08-27 05:59:17
1
132222 10200839298501 2011-08-27
05:59:17 10200851993798 2011-08-27 07:05:40
1
132223 10200851993798 2011-08-27
07:05:40 10200851993847 2011-08-27 07:05:44
而且這兩個備份並不在同一個磁帶中,前面的一份歸檔備份和全庫備份同處於一個磁帶中,因此在恢復的過程中,直接將這盤磁帶取出,在另一臺伺服器上進行恢復。
全庫的還原沒有碰到問題,但是恢復歸檔日誌則碰到了下面的錯誤:
RMAN> run
2> {
3> ALLOCATE CHANNEL ch00 TYPE
'SBT_TAPE';
4> SEND 'NB_ORA_SERV=nbusrv,
NB_ORA_CLIENT=ccicdbsrv5';
5> restore archivelog from
sequence 132214 until sequence 132220;
6> RELEASE CHANNEL ch00;
7> }
allocated channel: ch00
channel ch00: sid=1630 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 6.5 (2007072323)
sent command to channel: ch00
Starting restore at 2011-09-11 21:03:48
channel ch00: starting archive log restore to default destination
channel ch00: restoring archive log
archive log thread=1 sequence=132214
channel ch00: restoring archive log
archive log thread=1 sequence=132215
channel ch00: restoring archive log
archive log thread=1 sequence=132216
channel ch00: restoring archive log
archive log thread=1 sequence=132217
channel ch00: restoring archive log
archive log thread=1 sequence=132218
channel ch00: restoring archive log
archive log thread=1 sequence=132219
channel ch00: restoring archive log
archive log thread=1 sequence=132220
channel ch00: reading from backup piece al_43201_1_760259146
ORA-19870: error reading backup piece al_43201_1_760259146
ORA-19507: failed to retrieve sequential file,
handle="al_43201_1_760259146", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Failed to open backup file for
restore.
failover to previous backup
channel ch00: starting archive log restore to default
destination
channel ch00: restoring archive log
archive log thread=1 sequence=132214
channel ch00: restoring archive log
archive log thread=1 sequence=132215
channel ch00: restoring archive log
archive log thread=1 sequence=132216
channel ch00: restoring archive log
archive log thread=1 sequence=132217
channel ch00: restoring archive log
archive log thread=1 sequence=132218
channel ch00: restoring archive log
archive log thread=1 sequence=132219
channel ch00: restoring archive log
archive log thread=1 sequence=132220
channel ch00: reading from backup piece al_43199_1_760245675
ORA-19870: error reading backup piece al_43199_1_760245675
ORA-19507: failed to retrieve sequential file,
handle="al_43199_1_760245675", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Failed to process backup file
failover to previous backup
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/11/2011 21:04:30
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of log thread 1 seq 132220 lowscn 10200831803462 found to
restore
RMAN-06025: no backup of log thread 1 seq 132219 lowscn 10200831622590 found to
restore
RMAN-06025: no backup of log thread 1 seq 132218 lowscn 10200828085370 found to
restore
RMAN-06025: no backup of log thread 1 seq 132217 lowscn 10200826640012 found to
restore
RMAN-06025: no backup of log thread 1 seq 132216 lowscn 10200825451525 found to
restore
RMAN-06025: no backup of log thread 1 seq 132215 lowscn 10200825450980 found to
restore
RMAN-06025: no backup of log thread 1 seq 132214 lowscn 10200825285755 found to
restore
由於要恢復的歸檔日誌在兩個備份集中存在,因此RMAN嘗試了兩次進行恢復。第一次尋找al_43201_1_760259146檔案,由於這個檔案不在當前的磁帶中,恢復失敗是正常的,但是al_43199_1_760245675檔案就存放在當前的磁帶中,而仍然出現無法獲取檔案的錯誤就不正常了。
考慮到恢復環境和備份環境並不一致,備份時使用的帶庫而當前僅包含一個磁帶,且磁帶的catalog資訊很可能也沒有匯入,因此對於源資料的查詢可能存在問題。
透過CHANGE BACKUP TAG ‘TAG20110827T070545’ UNAVAILABLE的方式,避免恢復過程中去尋找目前並不存在的備份。再次使用RMAN執行同樣的恢復操作,這次恢復成功。
恢復應該在和備份等同條件下進行,否則至少應該保證帶庫的CATALOG資料匯入,否則就可能出現這種跨磁帶查詢檔案時出現的錯誤,而利用RMAN直接在當前的磁帶中掃描檔案則不受影響。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-707217/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 利用tar向磁帶備份恢復檔案
- 騰訊雲深度歸檔讓資料從磁帶走向雲端
- HPUX 磁帶恢復的大概過程UX
- 刪除歸檔出現ORA-15028錯誤
- Oracle RAC Standby 恢復歸檔numuber錯亂Oracle
- 恢復之非歸檔模式下的恢復模式
- 備份與恢復--從備份的歸檔日誌中恢復資料
- Oracle BBED 跳過歸檔實現完全恢復Oracle
- rman datafile恢復(歸檔模式)模式
- 老虎是如何從備份集中恢復歸檔日誌
- ASM上恢復STANDBY資料庫出現ORA-15173錯誤ASM資料庫
- SQL Server資料庫出現邏輯錯誤的資料恢復SQLServer資料庫資料恢復
- 總是歸檔錯誤-重置歸檔目錄
- 控制檔案恢復—從trace檔案中恢復
- rman恢復控制檔案的一個小錯誤
- 一個錯誤的資料檔案的恢復
- 控制檔案恢復—從快照中恢復
- DG歸檔日誌缺失恢復
- 無備份恢復(歸檔模式)模式
- ORACLE非歸檔下的恢復Oracle
- 【備份恢復】恢復 丟失已歸檔重做日誌檔案
- 恢復案例:無歸檔,掉電,控制檔案全部丟失恢復
- 用restore archivelog從備份集中恢復歸檔日誌RESTHive
- 非歸檔庫誤刪表空間後的資料恢復資料恢復
- 恢復案例:歸檔模式下丟失全部資料檔案的恢復模式
- 從備份片中恢復某個指定得歸檔或者資料檔案
- 恢復案例:無歸檔,丟失全部控制檔案、日誌檔案恢復案例
- 非歸檔模式恢復資料庫模式資料庫
- Data Guard跳歸檔恢復的案例
- 只有冷備和歸檔,能否恢復?
- standby缺失primary歸檔,手工同步恢復
- oracle日誌錯誤恢復(轉)Oracle
- 深入理解 HDFS 錯誤恢復
- 恢復歸檔日誌檔案的常用方法
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- 誤刪資料檔案在沒有歸檔的情況下恢復實驗