RMAN
connect target /;
run {
crosscheck archivelog all;
}
ORA-19633: control file record 1 is out of sync with recovery catalog
二、问题排查
SQL> select FIRST_TIME,name,sequence#,status,thread# from v$archived_log where recid=58407;
FIRST_TIME NAME SEQUENCE# STA THREAD#
-------------------------------------------------------------------------------------------
02-SEP-22 D:\ARCHIVELOG\MESORCL\ARCHIVELOG\2022_09_02\O1_MF_1_5_KK2QG8BQ_.ARC 5 A 1
RMAN> delete force archivelog sequence 5;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=8 device type=DISK
specification does not match any archived log in the repository
catalog archivelog 'D:\ARCHIVELOG\MESORCL\ARCHIVELOG\2022_09_02\O1_MF_1_5_KK2QG8BQ_.ARC';
通过查询,可以发现,使用force,catalog 无法强制删除归档或者重新注册归档(归档文件已不存在)
SQL> select name from v$archived_log;
NAME
--------------------------------------------------------------------------------
/oracle/arch/rbcheckin/1_3579_990090011.dbf
/oracle/arch/rbcheckin/1_3580_990090011.dbf
/oracle/arch/rbcheckin/1_3581_990090011.dbf
/oracle/arch/rbcheckin/1_3582_990090011.dbf
/oracle/arch/rbcheckin/1_3583_990090011.dbf
/oracle/arch/rbcheckin/1_3584_990090011.dbf
/oracle/arch/rbcheckin/1_3585_990090011.dbf
/oracle/arch/rbcheckin/1_3586_990090011.dbf
5024 rows selected.
当前的归档路径是linux文件系统,而报错的归档是在windows的路径,因此沟通发现,这套库是22年从windows平台迁移至linux
目标就是删除这个无效的归档日志
三、问题处理
1、清理所有归档信息
SQL>execute sys.dbms_backup_restore.resetCfileSection( 11);
SQL> select name from v$archived_log;
no rows selected
2、重新注册归档
RMAN> catalog start with '/oracle/archivelog/';
Removing entries in v$archived_log referencing a particluar DEST_ID (Doc ID 845361.1)
原理是清空控制文件中的归档日志信息,重新使用catalog进行注册
由于本次控制文件记录该日志是有效的,但实际文件不存在,通过crosscheck archive过程报错,因此无法常规手段进行处理;