Flashback logs 保存 有最少一小时的限制

With flashback database turned on, the flashback logs used most of the space in the fast recovery area, and were not deleted when space was needed for archive logs. Subsequently, the database hung.

ORA-19815: WARNING: db_recovery_file_dest_size of 524288000 bytes is 100.00% used, and has 0 remaining bytes available.
************************************************************************
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.
************************************************************************
Errors in file /<PATH>/orcl_arc2_15324.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 5242880 bytes disk space from 524288000 limit
ARC2: Error 19809 Creating archive log file to '+<FRA DISK GROUP>'

SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
        set linesize 132 serveroutput on pagesize 50000
        select * from v$FLASHBACK_DATABASE_LOGFILE;
        select * from V$FLASHBACK_DATABASE_STAT;
        select * from V$FLASHBACK_DATABASE_LOG;

NAME                                                    LOG#       THREAD#    SEQUENCE#  BYTES      FIRST_CHANGE# FIRST_TIME
---------------------------------------------------- ---------- ---------- ---------- ---------- ------------- --------------------
+<FRA DISK GROUP>/log_1.261.782829073        1          2          6          15941632   1048169       10-MAY-2012 10:00:04  lowest log sequence# listed
...
+<FRA DISK GROUP>/log_60.339.782904711     60         1          103        15941632   1045574       10-MAY-2012 09:31:51 highest log sequence# listed.

 
The first_time only accounts for 30 minutes of flashback logging so the 1 hour hard limit has not been reached in this database yet.

CAUSE

Some flashback logs that will not be deleted when the fast recovery area sees space pressure and archiver will fail. There is a coded hard limit on how much flashback logs can be deleted to make space for new archivelogs.

When archiver wants disk space to archive online redo log and there is no files to purged from FRA, then instead of making the database hang, flashback logs (that is not required for GRP) will be purged to hard limit. Once that hard limit is reached, no more flashback logs can be purged and the database will hang.

The hard limit is _MINIMUM_DB_FLASHBACK_RETENTION value. The default is 1 hour. So, we start purging flashback logs until we reach 1 hour of flashback_retention_time after which we give up purging flashback logs.

NOTE:  Flashback logs will also be retained for restore points.  

SOLUTION

The hard limit is  _MINIMUM_DB_FLASHBACK_RETENTION value. The default is 1 hour.  So, we start purging flashback logs until we reach 1 hour of flashback_retention_time after which we give up purging flashback logs. 

The real solution is to add more space to the FRA to allow for the flashback_retention_period.  Tweaking _MINIMUM_DB_FLASHBACK_RETENTION is NOT recommended

Add: SQL> alter system set "_flashback_verbose_info"=true;

This will provide more detailed information about the space pressure and how to manage it but in this case the solution is to add more space to allow for:

  db_flashback_retention_target = 1440 (1 DAY) since we stop purging when there is only 1 hour of flashback logs left.

 NOTE: Flashback logs will also be retained for restore points.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值