ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

The error occur because the keep attribute store the backups for the proposed time retention without obsoleting the backups. The backup files cannot be kept in FRA location.

RMAN> run
2> {
3> backup as compressed backupset database keep forever;
4> backup current controlfile;
5> }

Starting backup at 03-AUG-21

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=93 device type=DISK
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00007 name=/data01/oradata/ORCL19X1/datafile/o1_mf_users_jj20ygtm_.dbf
channel ORA_DISK_1: starting piece 1 at 03-AUG-21
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/03/2021 23:25:23
ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

Workaround:

Disable db_recovery_file_dest to enable keep clause in rman

SQL> show parameter db_reco

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /data01/FRA

Use blank value. By default oracle place the backup pieces to the oracle home location. You can use format ‘/nfs/%U’ to store the backup permanently in the disk which is used for storing backups for long time

SQL> alter system set db_recovery_file_dest='';

System altered.

Try backup now.

RMAN> run
{
backup as compressed backupset database tag FBKP_AUG2021 keep forever format '/data01/%U';
backup current controlfile;
}2> 3> 4> 5>

Starting backup at 03-AUG-21

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data01/oradata/ORCL19X1/datafile/o1_mf_system_jj20snjl_.dbf
input datafile file number=00017 name=/apps01/oradata/orcl19x/rcattbs
input datafile file number=00003 name=/data01/oradata/ORCL19X1/datafile/o1_mf_sysaux_jj20wyfy_.dbf
channel ORA_DISK_1: starting piece 1 at 03-AUG-21
channel ORA_DISK_1: finished piece 1 at 03-AUG-21
piece handle=/data01/1305kdt6_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/data01/oradata/ORCL19X1/C82B69D6A08B244CE055D9A11F7920E3/datafile/o1_mf_sysaux_jj23sppn_.dbf
input datafile file number=00009 name=/data01/oradata/ORCL19X1/C82B69D6A08B244CE055D9A11F7920E3/datafile/o1_mf_system_jj23spk6_.dbf
input datafile file number=00011 name=/data01/oradata/ORCL19X1/C82B69D6A08B244CE055D9A11F7920E3/datafile/o1_mf_undotbs1_jj23sppo_.dbf
input datafile file number=00012 name=/data01/oradata/ORCL19X1/C82B69D6A08B244CE055D9A11F7920E3/datafile/o1_mf_users_jj240bkz_.dbf
channel ORA_DISK_1: starting piece 1 at 03-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1405kdvh_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/data01/oradata/ORCL19X1/C82B775ECC0924B8E055D9A11F7920E3/datafile/o1_mf_sysaux_jj240k3x_.dbf
input datafile file number=00013 name=/data01/oradata/ORCL19X1/C82B775ECC0924B8E055D9A11F7920E3/datafile/o1_mf_system_jj240k3o_.dbf
input datafile file number=00015 name=/data01/oradata/ORCL19X1/C82B775ECC0924B8E055D9A11F7920E3/datafile/o1_mf_undotbs1_jj240k3y_.dbf
input datafile file number=00016 name=/data01/oradata/ORCL19X1/C82B775ECC0924B8E055D9A11F7920E3/datafile/o1_mf_users_jj2458o0_.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1505ke0k_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/data01/oradata/ORCL19X1/datafile/o1_mf_sysaux_jj220546_.dbf
input datafile file number=00005 name=/data01/oradata/ORCL19X1/datafile/o1_mf_system_jj2204tb_.dbf
input datafile file number=00008 name=/data01/oradata/ORCL19X1/datafile/o1_mf_undotbs1_jj220571_.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1605ke1o_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data01/oradata/ORCL19X1/datafile/o1_mf_undotbs1_jj20ycns_.dbf
input datafile file number=00007 name=/data01/oradata/ORCL19X1/datafile/o1_mf_users_jj20ygtm_.dbf
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1705ke2h_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
current log archived

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=13 RECID=8 STAMP=1079654483
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1805ke2l_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1905ke2n_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/1a05ke2q_1_1 tag=FBKP_AUG2021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-21

Starting backup at 04-AUG-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 04-AUG-21
channel ORA_DISK_1: finished piece 1 at 04-AUG-21
piece handle=/data01/product/19.0.0/dbs/1b05ke2t_1_1 tag=TAG20210804T000133 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-AUG-21

Starting Control File and SPFILE Autobackup at 04-AUG-21
piece handle=/data01/product/19.0.0/dbs/c-2012336792-20210804-00 comment=NONE
Finished Control File and SPFILE Autobackup at 04-AUG-21

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s