Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1030993
  • 博文数量: 159
  • 博客积分: 3063
  • 博客等级: 中校
  • 技术积分: 2703
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-01 01:51
文章分类

全部博文(159)

文章存档

2013年(48)

2012年(111)

分类: Oracle

2013-08-09 23:26:31

What to do when an obsolete rman object can't be found.

Make sure ORACLE_HOME, ORACLE_SID and PATH are set correctly

 - rman also comes with X11R6 so make sure that ORACLE_HOME/bin is first in your PATH

Log Into RMAN

rman target /

Find the mismatched objects

 

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          90     16-AUG-11          /u01/app/oracle/arch1/1_5_759334699.dbf
Archive Log          91     16-AUG-11          /u01/app/oracle/orch2/1_5_759334699.dbf
Archive Log          92     16-AUG-11          /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_16/o1_mf_1_5_74n5v4dh_.arc

有三个archive log文件已过时。。

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          90     16-AUG-11          /u01/app/oracle/arch1/1_5_759334699.dbf
Archive Log          91     16-AUG-11          /u01/app/oracle/orch2/1_5_759334699.dbf
Archive Log          92     16-AUG-11          /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_16/o1_mf_1_5_74n5v4dh_.arc

Do you really want to delete the above objects (enter YES or NO)? yes

RMAN-06207: WARNING: 3 objects could not be deleted for DISK 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: Archivelog      /u01/app/oracle/arch1/1_5_759334699.dbf
RMAN-06214: Archivelog      /u01/app/oracle/orch2/1_5_759334699.dbf
RMAN-06214: Archivelog      /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_16/o1_mf_1_5_74n5v4dh_.arc

此时报错,无法删除

RMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status  

提示用crosscheck命令核对

RMAN> crosscheck archivelog '/u01/app/oracle/arch1/1_5_759334699.dbf';

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
validation failed for archived log
archive log filename=/u01/app/oracle/arch1/1_5_759334699.dbf recid=90 stamp=759337700
Crosschecked 1 objects

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          90     16-AUG-11          /u01/app/oracle/arch1/1_5_759334699.dbf
Archive Log          91     16-AUG-11          /u01/app/oracle/orch2/1_5_759334699.dbf
Archive Log          92     16-AUG-11          /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011_08_16/o1_mf_1_5_74n5v4dh_.arc
deleted archive log
archive log filename=/u01/app/oracle/arch1/1_5_759334699.dbf recid=90 stamp=759337700
Deleted 1 objects

阅读(3528) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~