DIY编程器网

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 789|回复: 0
打印 上一主题 下一主题

[待整理] 在Oracle 10g中如何解决ORA-19815错误

[复制链接]
跳转到指定楼层
楼主
发表于 2014-10-13 14:24:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
问题:在备份Oracle10g时出现下面的错误:


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;
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 分享分享 支持支持 反对反对
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|文字版|手机版|DIY编程器网 ( 桂ICP备14005565号-1 )

GMT+8, 2024-11-16 17:52 , 耗时 0.094940 秒, 18 个查询请求 , Gzip 开启.

各位嘉宾言论仅代表个人观点,非属DIY编程器网立场。

桂公网安备 45031202000115号

DIY编程器群(超员):41210778 DIY编程器

DIY编程器群1(满员):3044634 DIY编程器1

diy编程器群2:551025008 diy编程器群2

QQ:28000622;Email:libyoufer@sina.com

本站由桂林市临桂区技兴电子商务经营部独家赞助。旨在技术交流,请自觉遵守国家法律法规,一旦发现将做封号删号处理。

快速回复 返回顶部 返回列表