ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN: Use CROSSCHECK command to fix status

RMAN: Use CROSSCHECK command to fix status

原创 Linux操作系统 作者:spider0912 时间:2011-08-16 17:04:57 0 删除 编辑

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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26043157/viewspace-705004/,如需转载,请注明出处,否则将追究法律责任。

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

注册时间:2011-07-10

  • 博文量
    19
  • 访问量
    42503