归档日志被物理删除后执行rman操作报错:

RMAN> backup database plus archivelog;

Starting backup at -JUL- ::
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK
RMAN-: ===========================================================
RMAN-: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-: ===========================================================
RMAN-: failure of backup plus archivelog command at // ::
RMAN-: expected archived log not found, loss of archived log compromises recoverability
ORA-: error identifying file /home/oracle/arch/1_4_882107304.dbf
ORA-: unable to obtain file status
Linux-x86_64 Error: : No such file or directory
Additional information:

处理方法:(crosscheck 会将找不到的归档日志标记为expired状态)

RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK
validation failed for archived log
archived log file name=/home/oracle/arch/1_4_882107304.dbf RECID= STAMP=
validation failed for archived log
archived log file name=/home/oracle/arch/1_5_882107304.dbf RECID= STAMP=
validation failed for archived log
archived log file name=/home/oracle/arch/1_6_882107304.dbf RECID= STAMP=
validation failed for archived log
archived log file name=/home/oracle/arch/1_1_882110245.dbf RECID= STAMP=
validation failed for archived log
archived log file name=/home/oracle/arch/1_2_882110245.dbf RECID= STAMP=
validation succeeded for archived log
archived log file name=/home/oracle/arch/1_3_882110245.dbf RECID= STAMP=
Crosschecked objects RMAN> backup database plus archivelog;

此外,可以查看一下归档日志的状态:

SQL> select sequence#,
2 name,
3 status,
4 decode(status,'A','available','D','deleted','U','unavailable','X','expired')
5 from v$archived_log; SEQUENCE# NAME S DECODE(STAT
---------- ---------------------------------------- - -----------
4 /u01/app/oracle/oradata/yb1/redo01.log A available
5 /u01/app/oracle/oradata/yb1/redo02.log A available
6 /u01/app/oracle/oradata/yb1/redo03.log A available
4 /home/oracle/arch/1_4_882107304.dbf X expired
5 /home/oracle/arch/1_5_882107304.dbf X expired
6 /home/oracle/arch/1_6_882107304.dbf X expired
1 /home/oracle/arch/1_1_882110245.dbf X expired
2 /home/oracle/arch/1_2_882110245.dbf X expired
3 /home/oracle/arch/1_3_882110245.dbf A available
4 /home/oracle/arch/1_4_882110245.dbf A available
5 /home/oracle/arch/1_5_882110245.dbf A available 11 rows selected. SQL>

如果归档日志是被物理移动了位置,可以手动将归档日志注册进去:

RMAN> catalog start with '/xxx/xxx';#注册路径
RMAN> catalog archivelog '/home/oracle/arch/1_3_882110245.dbf';#注册具体归档日志
04-29 00:06