RMAN-06207和RMAN-06208的處理

space6212發表於2019-05-01
最近新上一套磁帶機,重新規劃了備份,執行一段時間後,最近兩天檢視RMAN備份,發現在維護備份集時有如下錯誤:

[@more@]Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 507 2011-03-29 17:16:12
Backup Piece 35 2011-03-29 17:16:12 ham8euqg_1_1
Backup Set 511 2011-03-29 17:19:05
Backup Piece 39 2011-03-29 17:19:05 hem8ev1t_1_1
Backup Set 513 2011-03-29 17:21:14
Backup Piece 41 2011-03-29 17:21:14 him8ev5v_1_1
Backup Set 519 2011-03-29 17:24:55
Backup Piece 47 2011-03-29 17:24:55 hmm8ev63_1_1
Backup Set 522 2011-03-29 17:35:41
Backup Piece 50 2011-03-29 17:35:41 hrm8evv5_1_1
Backup Set 525 2011-03-29 19:04:16
Backup Piece 53 2011-03-29 19:04:16 hum8f45m_1_1
......

RMAN-06207: WARNING: 54 objects could not be deleted for SBT_TAPE channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Backup Piece ham8euqg_1_1
......

看了一下日期,這些備份都是測試的時候產生的,後來已經用NBU直接清理掉了,但是看來RMAN沒有crosscheck這些備份片,沒有認出來這些備份片已經失效了。
解決方案是手工對這些備份片做一次crosscheck。

RMAN> allocate channel for maintenance device type sbt;

using target database control file instead of recovery catalog
allocated channel: ORA_MAINT_SBT_TAPE_1
channel ORA_MAINT_SBT_TAPE_1: sid=1426 instance=dwrac1 devtype=SBT_TAPE
channel ORA_MAINT_SBT_TAPE_1: Veritas NetBackup for Oracle - Release 7.0 (2010070800)

--原狀態
RMAN> list backuppiece 'ham8euqg_1_1';


List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
102 574 1 1 AVAILABLE SBT_TAPE ham8euqg_1_1

RMAN> crosscheck backuppiece 'ham8euqg_1_1';

crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=ham8euqg_1_1 recid=102 stamp=747165779
Crosschecked 1 objects

--crosscheck後狀態改變
RMAN> list backuppiece 'ham8euqg_1_1';


List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
102 574 1 1 EXPIRED SBT_TAPE ham8euqg_1_1

--刪除備份片
RMAN> delete expired backup;


List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
102 574 1 1 EXPIRED SBT_TAPE ham8euqg_1_1

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=ham8euqg_1_1 recid=102 stamp=747165779
Deleted 1 EXPIRED objects

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/231499/viewspace-1048811/,如需轉載,請註明出處,否則將追究法律責任。

相關文章