~~~~~~~~~~~~~~~~~
oracle11g释放recovery_file_dest,解决ORA-00257
2013年04月18日 08:55:19
阅读数:1815
SQL> conn hr/hr
ERROR:
ORA-00257: archiver error. Connect internal only, until freed.
Warning: You are no longer connected to ORACLE.
看提示是recovery_file_dest满了。通过alert验证
Errors in file /data01/apps/oracle/diag/rdbms/dwh01/dwh01/trace/dwh01_arc2_3412.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 42827776 bytes disk space from 4039114752 limit
ARC2: Error 19809 Creating archive log file to '/data01/apps/oracle/flash_recovery_area/DWH01/archivelog/2013_04_18/o1_mf_1_113_%u_.arc'
是因为recovery_file_dest满了,测试环境,所以直接手工删了,但空间没有释放。
SQL> select * from v$recovery_file_dest;
NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/data01/apps/oracle/flash_recovery_area
4039114752 4004434944 0 93
SPACE_USED还是满的,归档数仍然是93,实际上已经删光了。
这种情况在衣钩大师的blog中找到了解决办法:
http://www.eygle.com/archives/2005/03/oracle10gecieif.html
[oracle@rhel63db ~]$ rman target /
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
此时问题得到解决:
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/data01/apps/oracle/flash_recovery_area
4039114752 0 0 0
另外还有这样的解决办法,是将闪回空间备份到第三方介质
RMAN> backup recovery area;
~~~~~~~~~~~~~~~~~~
--from:转载自:www.cublog.cn/u/6436/showart_276653.html
1.什么是 RMAN
.RMAN 可以用来备份和还原数据库文件、归档日志和控制文件。它也可以用来执行完全或不完全的数据恢复。
注意:RMAN 不能用于备份初始化参数文件和口令文件。
RMAN 启动数据库上的Oracle服务器进程来进行备份或还原。备份、还原、恢复是由这些进程驱动的。
RMAN 可以由 OEM 的 Backup Manager GUI 来控制。
SQL> col name for a30
SQL> set line 100
快闪恢复区的参数信息:
SQL> show parameter db_recovery_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size big integer 10G
修改快闪恢复区的参数
SQL> alter system set db_recovery_file_dest_size =10g;
System altered.
查询空间使用情况
SQL> set line 100
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 2.44 0 2
ARCHIVED LOG 0 0 0
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
登录rman
[oracle@host5 mybak]$ rman
Recovery Manager: Release 11.2.0.2.0 - Production on Tue Aug 21 19:45:04 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN>
RMAN> connect target system/oracle
connected to target database: XE (DBID=2862092059)
RMAN>