Menu Close

Oracle DataGuard应用日志报错ORA-00059

1. 故障现象(SYMPTOMS)

现象1. 使用rman删除物理备库归档时报08137错误

RMAN-08137: warning: archived log not deleted, needed for standby or upstream capture process

现象2. 将物理备库重启后报如下错误

LZUDATA(10):Pluggable Database LZUDATA Dictionary check complete
2021-09-11T03:46:53.828228+08:00
Errors in file /u01/app/oracle/diag/rdbms/lzudg/LZUDG/trace/LZUDG_dbw0_455535.trc:
ORA-01157: cannot identify/lock data file 232 - see DBWR trace file
ORA-01110: data file 232: '/dbData/OracleData/LZUDG/952feeef7e4a7781e053821510ac6b42/tempfile/temp.348.1022014935'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7

2. 变化(CHANGES)

1)切换在报错日志文件的PDB中,执行以下命令报错:

SQL> select * from dba_temp_files;
select * from dba_temp_files
              *
ERROR at line 1:
ORA-01157: cannot identify/lock data file 232 - see DBWR trace file
ORA-01110: data file 232: '/dbData/OracleData/LZUDG/952feeef7e4a7781e053821510ac6b42/tempfile/temp.348.1022014935'

2)将临时文件删除

SQL> alter database tempfile '/dbData/OracleData/LZUDG/952feeef7e4a7781e053821510ac6b42/tempfile/temp.348.1022014935' drop;

3)物理备库重新应用日志报错

Errors in file /u01/app/oracle/diag/rdbms/lzudg/LZUDG/trace/LZUDG_pr00_17622.trc:
ORA-00059: maximum number of DB_FILES exceeded
PR00 (PID:17622): Managed Standby Recovery not using Real Time Apply
Recovery interrupted!

3. 故障原因(CAUSE)

原来主库中也是有最大文件限制,后来主库修改了忘记修改备库了。当主库新增加了数据文件后,备库无法添加数据文件,最终导致日志无法应用。

4. 解决方案(SOLUTION)

修改备库的参数db_files

重启数据库后,就可以看到备库在应用日志:

5. 总结(SUMMARY)

修改配置参数一定要慎重,并且综合考虑内丰与外在其他的影响。