ITPub博客

首页 > 数据库 > Oracle > RMAN-06207和RMAN-06208的处理

RMAN-06207和RMAN-06208的处理

原创 Oracle 作者:space6212 时间:2019-05-01 21:15:07 0 删除 编辑
最近新上一套磁带机,重新规划了备份,运行一段时间后,最近两天查看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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2005-01-25

  • 博文量
    188
  • 访问量
    141899