Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8507
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-13 10:28
文章分类
文章存档

2015年(2)

我的朋友
最近访客

分类: Oracle

2015-03-06 13:40:52

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

阅读(856) | 评论(0) | 转发(0) |
0

上一篇:MySQL 安装与使用

下一篇:没有了

给主人留下些什么吧!~~