分享
 
 
 

如何在Oracle中释放flash_recovery_area

王朝oracle·作者佚名  2008-06-01
窄屏简体版  字體: |||超大  

案例:Oracle数据库10g中释放flash_recovery_area解决ORA-19815错误。

错误现象:备份Oracle数据库10g时出现下面的错误:

ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 100.00% used, and has 0 remaining bytes available.

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

You have the following choices to free up space from

flash recovery area:

1. Consider changing your RMAN retention policy.

If you are using dataguard, then consider changing your

RMAN archivelog deletion policy.

2. Backup files to tertiary device such as tape using the

RMAN command BACKUP RECOVERY AREA.

3. Add disk space and increase the db_recovery_file_dest_size

parameter to reflect the new space.

4. Delete unncessary files using the RMAN DELETE command.

If an OS command was used to delete files, then use

RMAN CROSSCHECK and DELETE EXPIRED commands.

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

此时flash_recovery_area已经手工释放空间,即使切换到一个全新的磁盘也无法解决此问题。

继续连接数据库的查询:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Mon Mar 28 11:45:30 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SYS AS SYSDBA on 28-MAR-05 >set liesize 120

SP2-0158: unknown SET option "liesize"

SYS AS SYSDBA on 28-MAR-05 >set linesize 120

SYS AS SYSDBA on 28-MAR-05 >SELECT substr(name, 1, 30) name, space_limit AS quota,

2 space_used AS used,

3 space_reclaimable AS reclaimable,

4 number_of_files AS files

5 FROM v$recovery_file_dest ;

NAME QUOTA USED RECLAIMABLE FILES

---------------------------- ---------- ---------- ----------- ----------

/data5/flash_recovery_area 2147483648 2144863232 0 227

此时发现仍然记录了227个文件,USED空间仍然未被释放。

继续使用rman登录数据库来进行crosscheck:

$ rman target /

Recovery Manager: Release 10.1.0.2.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle. All rights reserved.

connected to target database: EYGLE (DBID=1337390772)

RMAN> crosscheck archivelog all;

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=144 devtype=DISK

validation failed for archived log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_790_0bjq36ps_.arc recid=1 stamp=526401126

validation failed for archived log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_791_0bkbcy7x_.arc recid=2 stamp=526420862

validation failed for archived log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_792_0bkkds4d_.arc recid=3 stamp=526428057

.......

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1014_0hh3zsrp_.arc recid=225 stamp=531678074

validation failed for archived log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1015_0hh40qyp_.arc recid=226 stamp=531678104

validation failed for archived log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1016_0hh41jqq_.arc recid=227 stamp=531678129

Crosschecked 227 objects

RMAN> delete expired archivelog all;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=144 devtype=DISK

List of Archived Log Copies

Key Thrd Seq S Low Time Name

------- ---- ------- - --------- ----

1 1 790 X 17-MAY-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_790_0bjq36ps_.arc

2 1 791 X 17-MAY-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_791_0bkbcy7x_.arc

3 1 792 X 17-MAY-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_792_0bkkds4d_.arc

.......

225 1 1014 X 16-JUL-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1014_0hh3zsrp_.arc

226 1 1015 X 16-JUL-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1015_0hh40qyp_.arc

227 1 1016 X 16-JUL-04 /opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1016_0hh41jqq_.arc

Do you really want to delete the above objects (enter YES or NO)? YES

deleted archive log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_790_0bjq36ps_.arc recid=1 stamp=526401126

deleted archive log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_05_17/o1_mf_1_791_0bkbcy7x_.arc recid=2 stamp=526420862

deleted archive log

......

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1014_0hh3zsrp_.arc recid=225 stamp=531678074

deleted archive log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1015_0hh40qyp_.arc recid=226 stamp=531678104

deleted archive log

archive log filename=/opt/oracle/flash_recovery_area/EYGLE/

archivelog/2004_07_16/o1_mf_1_1016_0hh41jqq_.arc recid=227 stamp=531678129

Deleted 227 EXPIRED objects

RMAN> exit

Recovery Manager complete.

此时空间得到释放:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Mon Mar 28 12:02:19 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SYS AS SYSDBA on 28-MAR-05 >SELECT substr(name, 1, 30) name, space_limit AS quota,

2 space_used AS used,

3 space_reclaimable AS reclaimable,

4 number_of_files AS files

5 FROM v$recovery_file_dest ;

NAME QUOTA USED RECLAIMABLE FILES

---------------------------- ---------- ---------- ----------- ----------

/data5/flash_recovery_area 2147483648 9959424 0 1

SYS AS SYSDBA on 28-MAR-05 >

解决方法:

可以通过执行如下命令:

RMAN> backup recovery area来解决此问题。

(注:将闪回区的内容备份到第三方介质,同样可以解决此问题)

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有