手動釋放歸檔空間解決ORA-00257錯誤

版權聲明:轉載時請以超鏈接形式標明文章原始出處和作者信息及本聲明
http://blog.csdn.net/wenshuangzhu/article/details/44059809


【問題描述】


性能測試時出現持續的數據庫連接失敗,報ora-00257錯誤:
ora-00257:archiver error. Connect internal only, until freed.

【問題定位】

根據下面的錯誤描述信息,可以知道問題很明顯是由於歸檔錯誤導致。

> oerr ora 00257
00257, 00000, "archiver error. Connect internal only, until freed."
// *Cause:  The archiver process received an error while trying to archive
//       a redo log
.  If the problem is not resolved soon, the database
//       will stop executing transactions. The most likely cause of this
//       message is the destination device is out of space to store the
//       redo log file.
// *Action:  Check archiver trace file for a detailed description
//        of the problem. Also verify that the
//       device specified in the initialization parameter
//       ARCHIVE_LOG_DEST is set up properly for archiving.

查詢歸檔日誌存放位置:
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +DG_ARCH
Oldest online log sequence     87
Next log sequence to archive   90
Current log sequence           91

可以看到歸檔日誌保存在asm磁盤組+DG_ARCH。

查詢asm磁盤組使用情況:
SQL> select name, total_mb, free_mb from v$asm_diskgroup; 
NAME                             TOTAL_MB    FREE_MB
------------------------------ ---------- ----------
DG_ARCH                            102400        587
DG_DATA                            204800     151431
DG_DBFILE                          102400      34787
DG_INDEX                           102400      81824

可以看到+DG_ARCH幾乎已經沒有空閒的存儲空間了。

定位原因爲性能測試數據庫開啓了數據庫歸檔,但是沒有任何策略去定期清理歸檔空間(例如定期備份並刪除無效的歸檔日誌),導致歸檔日誌長期累積耗盡磁盤存儲空間,並最終導致後續的歸檔操作均失敗。

【問題解決】

通過rman手動刪除歸檔日誌,釋放歸檔空間:
> rman target /
RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';  ---刪除7天前的所有歸檔日誌
RMAN> CROSCHECK ARCHIVELOG ALL;
RMAN> DELETE EXPIRED ARCHIVELOG ALL;
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章