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

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Here is one sample scenario for ORA-19811 error. I connected to target as / and tried to execute the change command. It is giving the ORA-19811 error. You should connect to recovery catalog database to execute the change command.
Also, you cannot use the KEEP for the backupset in Flash Back Recovery area (FRA). You need to copy the backupset outside of the FRA location and use the catalog backuppiece command whenever you wanted to restore it.
$ rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Fri Oct 28 03:58:18 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PROD (DBID=4171098217)

RMAN>  change backup tag PROD_WEEK_BKUP keep until time 'sysdate + 15';

using target database control file instead of recovery catalog
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=2648 instance=PROD device type=DISK
RMAN-00571: ===================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
RMAN-00571: ===================================================
RMAN-03009: failure of KEEP command on ORA_DISK_1 channel at 10/28/2011 03:59:13
ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

In below mentioned example I connected to recovery catalog and the same command successfully executed.

RMAN Change Command Restrictions and Usage Notes
  • The target instance must be started.
  • You should connect to recovery catalog to use The KEEP FOREVER clause.
  • You cannot use CHANGE... UNAVAILABLE or KEEP attributes for files stored in the flash recovery area.
  • The only CHANGE command that requires either a manual or automatic maintenance channel is the CHANGE ... AVAILABLE command. However, a maintenance channel is not required when CHANGE ... AVAILABLE is used with a file that is disk only (that is, an ARCHIVELOG, DATAFILECOPY, or CONTROLFILECOPY).
  • If you use CHANGE ... AVAILABLE on files that are not disk-only, and have objects created on device types that are not configured for automatic channels, then issue manual maintenance commands on these channels. For example, if you created a backup on an sbt channel, but have only a DISK channel automatically configured, then you must manually allocate an sbt channel before CHANGE ... AVAILABLE can operate on the backup.
Solution:
You have take the backups out of DB_RECOVERY_FILE_DEST area. Then you can easily change the TAG retention period.


RMAN>  backup database tag PROD_WEEK_BKUP format '/u01/oracle/bkup/prod/%U';

Starting backup at 05-DEC-12
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=+DATA/prod/datafile/siebel.297.772894485
input datafile file number=00004 name=+DATA/prod/datafile/users.462.772894501
channel ORA_DISK_1: starting piece 1 at 05-DEC-12
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/prod/datafile/undotbs1.464.772894499
input datafile file number=00002 name=+DATA/prod/datafile/sysaux.460.772894499
channel ORA_DISK_2: starting piece 1 at 05-DEC-12
channel ORA_DISK_3: starting compressed full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/prod/datafile/undotbs2.467.772894497
input datafile file number=00001 name=+DATA/prod/datafile/system.463.772894501
channel ORA_DISK_3: starting piece 1 at 05-DEC-12
channel ORA_DISK_4: starting compressed full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA/prod/datafile/undotbs3.466.772894499
input datafile file number=00007 name=+DATA/prod/datafile/siebelbck.911.800033625
channel ORA_DISK_4: starting piece 1 at 05-DEC-12
channel ORA_DISK_4: finished piece 1 at 05-DEC-12
piece handle=/u01/oracle/bkup/prod/a8ns2n2e_1_1 tag=PROD_WEEK_BKUP comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_3: finished piece 1 at 05-DEC-12
piece handle=/u01/oracle/bkup/prod/a7ns2n2d_1_1 tag=PROD_WEEK_BKUP comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_2: finished piece 1 at 05-DEC-12
piece handle=/u01/oracle/bkup/prod/a6ns2n2d_1_1 tag=PROD_WEEK_BKUP comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:46
channel ORA_DISK_1: finished piece 1 at 05-DEC-12
piece handle=/u01/oracle/bkup/prod/a5ns2n2d_1_1 tag=PROD_WEEK_BKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:06:46
Finished backup at 05-DEC-12

Starting Control File and SPFILE Autobackup at 05-DEC-12
piece handle=+RECO_MXEXT/prod/backups/prod_cf_c-3262395812-20121205-05 comment=NONE
Finished Control File and SPFILE Autobackup at 05-DEC-12

RMAN> change backup tag PROD_WEEK_BKUP Keep until time 'sysdate+30';

using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
keep attributes for the backup are changed
backup will be obsolete on date 04-JAN-13
backup set key=5671 RECID=5671 STAMP=801201234
keep attributes for the backup are changed
backup will be obsolete on date 04-JAN-13
backup set key=5672 RECID=5672 STAMP=801201262
keep attributes for the backup are changed
backup will be obsolete on date 04-JAN-13
backup set key=5673 RECID=5673 STAMP=801201272
keep attributes for the backup are changed
backup will be obsolete on date 04-JAN-13
backup set key=5674 RECID=5674 STAMP=801201628

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer