您的当前位置:首页正文

oracle归档日志满了的处理方法 (ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 87.41% use)

2024-11-07 来源:个人技术集锦

oracle归档日志满了的处理方法





  db_recovery_file_dest_size


  参考文档 :


  1.错误提示:


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


  Tue Apr 15 11:35:02 2008


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


  You have following choices to free up space from flash 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.


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


  默认值一般为2G,但在实际生产库上这个值显然是不够的,我们根据的自己数据库的模式和备份策略来设置这参数的大小,但不管怎样


  他还是有时候会满的.这就需要我们来解决了.


  解决方法:


  1.就是增大db_recovery_file_dest_size 的参数值


  A.


  SQL> show parameter db_recovery_file_dest_size


  NAME                                 TYPE        VALUE


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


  db_recovery_file_dest_size           big integer 2G


  B.


  SQL> alter system set  db_recovery_file_dest_size=3G;


  系统已更改。


  C.


  SQL> show parameter db_recovery_file_dest_size


  NAME                                 TYPE        VALUE


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


  db_recovery_file_dest_size           big integer 3G


  SQL>

 2.删除不必要的数据


  A.可以手动删除不必要的文件,但这个时候他并不释放空间,还需要执行rman命令来实际释放空间


  在os上删除不必要的文件,但查询,发现空间没有释放


  SQL> select substr(name,1,30) name,space_limit as quota,space_used as used,


  2  space_reclaimable as reclaimable,number_of_files as files from v$recovery_f


  ile_dest;


  NAME                                                              QUOTA       US


  ED RECLAIMABLE      FILES


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


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


  F:\oracle\product\10.2.0/flash                               2147483648  2393804


  80           0          5


  释放空间


  C:\Documents and Settings\Administrator>rman catalog target


  恢复管理器: Release 10.2.0.1.0 - Production on 星期二 4月 15 14:47:44 2008


  Copyright (c) 1982, 2005, .  All rights reserved.


  连接到目标数据库: MOVO (DBID=3762284645)


  RMAN> crosscheck archivelog all;


  分配的通道: ORA_DISK_1


  通道 ORA_DISK_1: sid=158 devtype=DISK


  对归档日志的验证成功


  存档日志文件名 =F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_04_14\O1_MF_1_51_4


  05X2ZBQ_.ARC 记录 ID=47 时间戳 =652025186


  对归档日志的验证失败


  存档日志文件名 =F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_04_14\O1_MF_1_52_4


  06CKOLK_.ARC 记录 ID=48 时间戳 =652039991


  对归档日志的验证失败


  存档日志文件名 =F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_04_15\O1_MF_1_53_4


  083TMJ3_.ARC 记录 ID=49 时间戳 =652097619


  对归档日志的验证失败


  存档日志文件名 =F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_04_15\O1_MF_1_54_4


  0856SOZ_.ARC 记录 ID=50 时间戳 =652099034

已交叉检验的 4 对象


  RMAN> delete expired archivelog all;


  释放的通道: ORA_DISK_1


  分配的通道: ORA_DISK_1


  通道 ORA_DISK_1: sid=158 devtype=DISK


  已存档的日志副本列表


  关键字     Thrd Seq     S 短时间     名称


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


  387     1    51      X 13-4月 -08 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_


  04_14\O1_MF_1_51_405X2ZBQ_.ARC


  是否确定要删除以上对象 (输入 YES 或 NO)? yes


  已删除的存档日志


  存档日志文件名 =F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\MOVO\ARCHIVELOG\2008_04_14\O1_MF_1_51_4


  05X2ZBQ_.ARC 记录 ID=47 时间戳 =652025186


  1 EXPIRED 对象已删除


  SQL> select substr(name,1,30) name,space_limit as quota,space_used as used,


  2  space_reclaimable as reclaimable,number_of_files as files from v$recovery_f


  ile_dest;


  NAME                                                              QUOTA       US


  ED RECLAIMABLE      FILES


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


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


  F:\oracle\product\10.2.0/flash                               2147483648  2393804


  80           0          4


  ---- end ----

显示全文