Thursday 18 February 2016

RMAN-06100 or RMAN-06102 during restore/duplicate

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

SYMPTOMS

Backups on the production site are written to tape and disk on separate days.
We want to use the backup on disk for an RMAN duplicate or restore to new host but RMAN does not appear to be finding these backups for use.

A DISK channel has been allocated for use but RMAN is still reporting RMAN-06100.
Error messages may appear as follows:
Starting restore at 19-JAN-14
using channel ORA_AUX_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: === ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/19/2014 19:18:55
RMAN-05501: aborting duplication of target database
RMAN-05556: not all datafiles have backups that can be recovered to SCN 866
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 18
  
During an RMAN recovery/duplicate, error messages may appear as:
RMAN-03002: failure of Duplicate Db command at 12/01/2014 06:40:24
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06102: no channel to restore a backup or copy of archived log for thread 2 with sequence 16436 and starting SCN of 124708864147
  


CAUSE
The appropriate channel has not been allocated to allow RMAN to retrieve the backup required.
That is, if the backuppiece is on tape, you must allocate a channel to tape. If the backuppiece is on disk you must ensure that a DISK channel is allocated.
Watch out for restore failovers, or EXPIRED backups.
For example, from the below, we can see that the disk backups are actually marked as EXPIRED.
So RMAN couldn't use the backup on disk and failed over to the previous backup, which was on tape.

The error message RMAN-06100 reflects that fact that we failover to previous backup and try to use the 'previous' backup on tape,
but there were no SBT_TAPE channels allocated.

We only allocated a channel to DISK!

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
8893    Incr 0  157.63G    SBT_TAPE    00:47:08     10-JAN-2014 06:59:31
       BP Key: 8947   Status: AVAILABLE  Compressed: NO  Tag: TAG20140110T061223
       Handle: BE_m5otmo67_1_1   Media:
 List of Datafiles in backup set 8893
 File LV Type Ckp SCN    Ckp Time             Name
 ---- -- ---- ---------- -------------------- ----
 1    0  Incr 8624751310 10-JAN-2014 06:12:23 +DATA/prod/datafile/system.256.719598619
...
 18   0  Incr 8624751310 10-JAN-2014 06:12:23 +DATA1/prod/datafile/development.260.819923171
...
 Backup Set Copy #1 of backup set 8915
 Device Type Elapsed Time Completion Time      Compressed Tag
 ----------- ------------ -------------------- ---------- ---
 DISK        01:06:30     16-JAN-2014 09:06:33 YES        TAG20140116T080003

   List of Backup Pieces for backup set 8915 Copy #1
   BP Key  Pc# Status      Piece Name
   ------- --- ----------- ----------
   8969    1   EXPIRED     C:\BACKUP\PROD\MROU6OO3_1_1.BAK << Expired!!
   8970    2   EXPIRED     C:\BACKUP\PROD\MROU6OO3_2_1.BAK
   8971    3   EXPIRED     C:\BACKUP\PROD\MROU6OO3_3_1.BAK
   8972    4   EXPIRED     C:\BACKUP\PROD\MROU6OO3_4_1.BAK
   8973    5   EXPIRED     C:\BACKUP\PROD\MROU6OO3_5_1.BAK
   8974    6   EXPIRED     C:\BACKUP\PROD\MROU6OO3_6_1.BAK
  


SOLUTION
1) If the disk backups still exist physically on disk then we need to run a crosscheck to change the status from EXPIRED To AVAILABLE.
For example:

RMAN> crossheck backuppiece 'C:\BACKUP\PROD\MROU6OO3_1_1.BAK';
RMAN> list backuppiece 'C:\BACKUP\PROD\MROU6OO3_1_1.BAK';


For an RMAN DUPLICATE, you need to run the crosscheck at the original host.
For an RMAN RESTORE, you need to run the crosscheck at the host where the backup is being restored to.

Once all backupieces are AVAILABLE for use, you can reattempt your restore or duplicate.

2) If the backups on disk no longer exist, then of course we cannot use it.
   You need to use the available backups on tape, then allocate a channel for SBT_TAPE.


No comments:

Post a Comment