I tried my first 11gR2 RMAN duplicate without connecting the target or catalogue databases yesterday.  I ran into a gotcha that I couldn’t find an Oracle MOS note to explain, so I thought I’d briefly describe it here.

(NB: this can affect other types of backup based 11g RMAN duplication too).

It all seemed straight forward at first.  I had to use a time instead of my preference of an SCN as the recovery point, but other than that it all went well until the recovery phase when the duplication failed with:

ORA-19870: error while restoring backup piece /ora/DEST_SID/fra01/SOURCE_SID/backupset/2011_12_11/o1_mf_annnn_SUN_FULL_7g8v67md_.bkp
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 100627456 bytes disk space from 429496729600 limit
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 2338
RMAN-10031: RPC Error: ORA-19583  occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/20/2011 13:48:39
RMAN-05501: aborting duplication of target database

RMAN was trying to restore archive logs into the FRA, but stopped because it thought the FRA was full.  In reality, only 320GB was used out of 400GB.  (The location of the backup files could have been in a different filesystem and I’d still have the same problem).

V$recovery_file_dest showed RMAN thought there was 756GB used in the FRA.  This would have been the amount used in the source system when the backup was taken.  (Two level 0 backups and a week’s worth of level 1 incremental and archive log backups).

The destination test environment only needed to hold one backup, so the FRA was intentionally smaller than the source production database to avoid wasting disk space.

My first thought was to run an RMAN crosscheck, but this didn’t help.  I decided to use one lie to defeat another:

alter system set db_recovery_file_dest_size=1000g;

Then I continued the duplicate by setting the DB_NAME to the same as the source and then:

run {
   set UNTIL time '11-DEC-2011 08:49:59';
   recover clone database;
   alter clone database open resetlogs;

Finally, I created a new controlfile and changed the DBID with NID.


One thought on “Phantom FRA vs RMAN Duplicate

  1. To be clear, this only applies to RMAN duplication during the recovery phase; it is not the same issue faced when seeing the error during an RMAN backup.
    (A reference to this post showed up in an Oracle Forum suggesting this post is related to running out of space when backing up the database).

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