柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: Oracle
2012-01-30 10:19:50
闪回区空间耗尽,且归档路径设置到了闪回恢复区中,则由于日志无法归档,数据库会hang住。数据库关闭不成功,重启后,再次启动,报错为
ORA-16038: log 3 sequence# 46 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 3 thread 1: '/oratest/redo/redo03.log'
如:
SQL> startup
instance started.
Total System Global Area 591396864 bytes
Fixed Size 2022536 bytes
Variable Size 176161656 bytes
Database Buffers 406847488 bytes
Redo Buffers 6365184 bytes
Database mounted.
ORA-16038: log 3 sequence# 46 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 3 thread 1: '/oratest/redo/redo03.log'
处理方法为:扩大闪回恢复空间大小
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=3g SCOPE=BOTH;
System altered.
SQL> alter database open;
Database altered.
SQL>
通过查询视图v$flash_recovery_area_usage,可以获得当前闪回恢复区的空间使用情况,并且可以知道是哪些文件占中了空间,据此可以做出相应的处理,或者加大闪回恢复区,或者移走相应的文件。
SQL> select * from v$recovery_file_dest;
NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/u01/oracle/flash_recovery_area
3221225472 2264589312 0 48
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE
------------------------ ------------------ -------------------------
NUMBER_OF_FILES
---------------
CONTROLFILE 0 0
0
ONLINELOG 0 0
0
ARCHIVELOG 70.3 0
48
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE
------------------------ ------------------ -------------------------
NUMBER_OF_FILES
---------------
BACKUPPIECE 0 0
0
IMAGECOPY 0 0
0
FLASHBACKLOG 0 0
0
6 rows selected.