Oracle清理闪回日志

来源:这里教程网 时间:2026-03-03 19:45:35 作者:

关于闪回日志的说明:

一旦关闭闪回, flashback recovery area 中的闪回日志将自动全部删除

闪回日志在出现空间压力的情况下, oracle 会自动删除闪回日志, 否则 有可能导致无法闪回到指定的时间点

 

参考文档:

NOTE:305817.1 - FAQ - Flash Recovery Area feature
NOTE:305812.1 - Flash Recovery area - Space management Warning & Alerts
NOTE:397269.1 - Relation between RMAN retention period and control_file_record_keep_time
NOTE:305648.1 - What is a Flash / Fast Recovery Area and how to configure it ?
 
Flash Recovery   area - Space management Warning & Alerts (Doc ID 305812.1)    
Oracle does not delete eligible files from the Flash Recovery Area until the space must be reclaimed for some other purpose. The effect is that files recently moved to tape are often still available on disk for use in recovery. The recovery area can thus serve as a kind of cache for tape. Once the Flash Recovery Area is full, Oracle automatically deletes eligible files to reclaim space in the Flash Recovery Area as needed.

 

关库:

shutdown immediate;

 

关闭闪回:

alter database flashback off;

 

到闪回目录确认闪回日志是否删除

 

开启闪回

alter database flashback on;

 

查看闪回保留时间

show parameter db_flashback_retention_target

 

酌情重设

alter system set db_flashback_retention_target=1440 scope=spfile;   (单位是minutes)1440minutes=24h

 

关库:

shutdown immediate;

 

起库

startup mount

 

 

相关推荐