轉至:https://www.cnblogs.com/benbenduo/p/7437333.html
問題現象:
通過命令提示符登陸數據庫,一般提示“ora-03113:通信通道的文件結尾”錯誤,查看trace日志,可以看到詳細信息。部分摘錄如下(橙色部分給出了建議方案):
Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc: ORA-19815: 警告: db_recovery_file_dest_size 字節 (共 4102029312 字節) 已使用 100.00%, 尚有 0 字節可用。 ************************************************************************ 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 g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc: ORA-19809: 超出了恢復文件數的限制 ORA-19804: 無法回收 17847808 字節磁盤空間 (從 4102029312 限制中) ARCH: Error 19809 Creating archive log file to 'G:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_08_26\O1_MF_1_561_%U_.ARC' Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc: ORA-16038: 日志 3 sequence# 561 無法歸檔 ORA-19809: 超出了恢復文件數的限制 ORA-00312: 聯機日志 3 線程 1: 'G:\ORADATA\ORCL\REDO03.LOG' USER (ospid: 1368): terminating the instance due to error 16038 ARC1: Archival started Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc0_4836.trc: ORA-01092: ORACLE instance terminated. Disconnection forced
解決方法(兩種):
- 增加歸檔空間,設置db_recovery_file_dest參數
sqlplus / as sysdba
shutdown abort -- 關閉進程
startup mount -- 啟動數據庫到mount模式
alter system set db_recovery_file_dest=10G; -- 設置歸檔空間大小
shutdown immediate -- 關閉數據庫
startup -- 啟動數據庫
- 刪除多余歸檔,只保留需要的(根據業務保留恢復數據庫所需要的最近歸檔),這種辦法同樣有兩種方式,一種直接rman方式刪除歸檔,一種在操作系統層次刪除,但是因為每個歸檔在數據庫中都有記錄,仍需再進入rman刪除失效歸檔文件,否則報錯。
第一種方式:
rman target / -- 進入rman模式 list archivelog all; --列出全部歸檔文件 delete archivelog all complited before 'SYSDATA-7'; --刪除7天前的所有歸檔
ps:SYSDATA-7,表明當前的系統時間7天前,before關鍵字表示在7天前的歸檔日志
第二種方式:
如果不小心在操作系統層次提前刪除了歸檔日志,需進入rman清楚過期歸檔日志信息。執行如下操作: rman target / crosscheck archivelog all; -- 檢查歸檔信息 delete expired archivelog all; -- 刪除過期歸檔
list archivelog all;
執行完畢后,退出rman,重啟數據庫。
附(部分rman命令):
- backup database 對數據庫做全備
- delete obsolete 根據備份策略刪除陳舊備份
- delete expired backup 刪除失效備份
- delete expired copy 刪除失效備份副本
- delete backup 刪除所有備份,慎用。如需使用,建議使用后立即備份一次
傳送門:關於rman完整的備份策略請參考: http://www.cnblogs.com/benbenduo/p/4939738.html
問題現象
通過命令提示符登陸數據庫,一般提示“ora-03113:通信通道的文件結尾 ”錯誤,查看trace日志,可以看到詳細信息。部分摘錄如下(粗體給出了建議方案):
Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc:
ORA-19815: 警告: db_recovery_file_dest_size 字節 (共 4102029312 字節) 已使用 100.00%, 尚有 0 字節可用。
************************************************************************
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 g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc:
ORA-19809: 超出了恢復文件數的限制
ORA-19804: 無法回收 17847808 字節磁盤空間 (從 4102029312 限制中)
ARCH: Error 19809 Creating archive log file to 'G:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_08_26\O1_MF_1_561_%U_.ARC'
Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_1368.trc:
ORA-16038: 日志 3 sequence# 561 無法歸檔
ORA-19809: 超出了恢復文件數的限制
ORA-00312: 聯機日志 3 線程 1: 'G:\ORADATA\ORCL\REDO03.LOG'
USER (ospid: 1368): terminating the instance due to error 16038
ARC1: Archival started
Errors in file g:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_arc0_4836.trc:
ORA-01092: ORACLE instance terminated. Disconnection forced
解決方法
l 增加歸檔空間,設置db_recovery_file_dest參數。
- Sqlplus / as sysdba
刪除多余歸檔,只保留需要的(根據業務保留恢復數據庫所需要的最近歸檔)。