ARCHIVE歸檔日誌爆滿故障ORA-00257

germany006發表於2015-06-23

以下為使用者給出的連線資料庫時出現的報錯圖片:


查詢alert.log日誌,如下:

報錯日誌如下:

Errors in file /u01/app/oracle/diag/rdbms/XXX/XXX/trace/XXX_arc0_1687690.trc:

ORA-19815: WARNING: db_recovery_file_dest_size of 85899345920 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.

************************************************************************

Errors in file /u01/app/oracle/diag/rdbms/XXX/XXX/trace/XXX_arc0_1687690.trc:

ORA-19809: limit exceeded for recovery files

ORA-19804: cannot reclaim 465567744 bytes disk space from 85899345920 limit

ARC0: Error 19809 Creating archive log file to '+DATA'

ARCH: Archival stopped, error occurred. Will continue retrying

ORACLE Instance otmdb2 - Archival Error

ORA-16038: log 4 sequence# 106589 cannot be archived

ORA-19809: limit exceeded for recovery files

ORA-00312: online log 4 thread 2: '+DATA/XXX/onlinelog/group_4_redo_log_04_01.log'

ORA-00312: online log 4 thread 2: '/u01/app/oracle/product/group_4_redo_log_04_02.log'





故障現象:
所有使用者無法連線資料庫,RMAN也無法登陸。
資料庫節點1狀態當機,stated狀態。

處理方法:
1、查詢是否歸檔:
select name,log_mode from v$database;

查詢歸檔路徑:
select name from v$archived_log where name is not null;

發現歸檔路徑是設定的預設路徑FLASHBACK閃回空間


2、查詢歸檔使用百分比情況(因為是預設路徑在FLASHBACK):
 select * from V$FLASH_RECOVERY_AREA_USAGE;

發現使用百分比達到99%

解決方法一:
3、刪除歸檔日誌
su - grid
asmcmd
cd DATA/
cd ARCHIVE/
cd 2015-06-23/
rm *  (注意保留最後一個最新日期的歸檔日誌不要刪除)

rman target /             (在登陸rman時有可能會無法登陸,一直卡住,可以嘗試換另外一個節點登陸)
crosscheck archivelog;
delete expired archivelog;


解決方法二:
擴容閃回空間
節點1當機了,登陸節點2

1、檢視閃回空間總容量
show parameter db_recovery


2、查詢閃回空間使用率:
select * from v$flash_recovery_area_usage;

3、計算flash recovery area已經佔用的空間:(這裡的8就是閃回空間總容量)

select sum(percent_space_used)*8/100 from v$flash_recovery_area_usage;


--檢視歸檔日誌空間使用情況(PERCENT_SPACE_USED是已使用的百分比
 select FILE_TYPE,PERCENT_SPACE_USED,NUMBER_OF_FILES from v$flash_recovery_area_usage where file_type='ARCHIVED LOG' 

4、擴大閃回空間容量
alter system set db_recovery_file_dest_size=20G 
scope=both;


注意:
1、擴大閃回空間容量,設定要比原來的大
2、擴大閃回空間容量前最好能停止應用程式
3、全備資料庫(備份指令碼要有備份歸檔日誌,自動清理過期歸檔日誌
),這樣可以釋放閃回空間。


補充:
根本原因是:開發組人員進行了大量歸檔更新操作(update,delete),但沒有通知我們,導致產生大量歸檔日誌檔案,開發組人員關閉歸檔更新操作(update,delete)後,問題解決。


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28371090/viewspace-1708893/,如需轉載,請註明出處,否則將追究法律責任。

相關文章