数据库报错--归档问题
报错1 数据库归档失败
现象:
SYS@ocp> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 1 sequence# 118 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/OCP/onlinelog/o1_mf_1_fb8w646y_.log'
ORA-00312: online log 1 thread 1: '/u01/app/oracle/fast_recovery_area/OCP/onlinelog/o1_mf_1_fb8w649k_.log'
警告日志报错:
ARC1: Error 19809 Creating archive log file to '/u01/FRA/OCP/archivelog/2018_09_07/o1_mf_1_119_%u_.arc'
Errors in file /u01/app/oracle/diag/rdbms/ocp/ocp/trace/ocp_arc0_4628.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
原因
1.日志发现:数据库归档放在快速恢复区,快速恢复区域满
2.根据日志一次排查
2.1非DG
2.2备份位置为本地磁盘
2.3本地空间权限正确,空间足够,只有24K
[oracle@bonda1 u01]$ cd /u01/FRA/
[oracle@bonda1 FRA]$ du -sk
2.4删除过期的归档,crosscheck发现,目录/u01/app/oracle/fast_recovery_area/下面存在归档,但不是目前指定的FRA区=====>由此推断oracle计算fra的使用情况,根据元数据中已有归档的总大小来判断,而不是归档目录下面归档文件的大小
RMAN> crosscheck archivelog all;
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_10/o1_mf_1_5_fb91q42w_.arc RECID=1 STAMP=970432281
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_10/o1_mf_1_6_fb977t7h_.arc RECID=2 STAMP=970437930
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_11/o1_mf_1_7_fbb2roox_.arc RECID=3 STAMP=970469719
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_11/o1_mf_1_8_fbb2tqym_.arc RECID=4 STAMP=970469786
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_12/o1_mf_1_9_fbd5pr6c_.arc RECID=5 STAMP=970538268
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_13/o1_mf_1_10_fbhfcqx8_.arc RECID=6 STAMP=970644408
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_14/o1_mf_1_11_fbkgn9fj_.arc RECID=7 STAMP=970711242
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_16/o1_mf_1_12_fbrxomo2_.arc RECID=8 STAMP=970956022
validation succeeded for archived log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/archivelog/2018_03_17/o1_mf_1_13_fbt7zl49_.arc RECID=9 STAMP=970999347
validation succeeded for archived log
解决方法
1.删除历史归档
RMAN>delete noprompt force archivelog all completed before 'sysdate-1';
2.可成功生成归档
SYS@ocp> alter system archive log current;
System altered.