Why archived log size is small but fast recovery area still has a lot free space

oraclerecoveryrman

when recovery database I met a strange problem,my recovery script as follow:

RUN
{ 
  SET UNTIL TIME 'DEC 25 2013 09:00:00' ;    
  RESTORE DATABASE;
  RECOVER DATABASE;
} 

but rman report as follow:

........... 
Oracle Error: 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/home/u01/app/oracle/oradata/ghsjdb/system01.dbf'

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/27/2013 10:46:53
RMAN-06557: unable to restore archived log of thread 1 with sequence 742
RMAN-06558: archived log size of 37788 kb is bigger than available space of 6664 kb

then I check fast recovery area at once

SQL> select SPACE_USED/SPACE_LIMIT from v$recovery_file_dest;

SPACE_USED/SPACE_LIMIT
----------------------
            .200951743

SQL> show parameter recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /home/u01/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 20G

there all still 80% free space, is about 20g * 0.8 =16g ,why rman report no available space?

Best Answer

that issue was caused due to lack of space in FRA(Flashback recovery area) if configured or the archive log destination.

option 1. Restore the archive log to an alternate location which has space

example:

RMAN> run {
set ARCHIVELOG DESTINATION TO '<new location with sufficient free space>';
recover database until time "to_date('2013-12-25 09:00:00', 'YYYY-MM-DD HH24:MI:SS')";
}

option 2. Set MAXSIZE limit

example:

RMAN> run {
recover database until time "to_date('2013-12-25 09:00:00', 'YYYY-MM-DD HH24:MI:SS')" delete archivelog maxsize 50 K ; }