3 Replies Latest reply: Jan 30, 2013 2:06 AM by brunors RSS

    Help with RMAN restore to backup system

    510477
      I'm trying to recover some data from a table that accidentally got nuked. Flaskback was not enabled, so I am trying to restore from backup to backup server to recover data. I have a full backup including archivelogs and control file, but I can't seem to get past an error saying it already has a piece.

      This is a Windows 2008 server running 10gR2. I have previously created a backup instance on this box and restored to it successfully. The database can mount and run. Prior to this I restored the controlfile from the backup without a hitch. DB is currently in nomount.

      Here's the log:
      C:\Users\Administrator>rman TARGET / NOCATALOG
      
      Recovery Manager: Release 10.2.0.3.0 - Production on Wed Dec 1 16:55:38 2010
      
      Copyright (c) 1982, 2005, Oracle.  All rights reserved.
      
      connected to target database: TS (DBID=1927454737, not open)
      using target database control file instead of recovery catalog
      
      RMAN> catalog start with 'D:\Oracle_backup';
      
      searching for all files that match the pattern D:\Oracle_backup
      
      List of Files Unknown to the Database
      =====================================
      File Name: D:\Oracle_backup\arcserve_daily.asx
      File Name: D:\Oracle_backup\C-1927454737-20101130-00
      File Name: D:\Oracle_backup\C-1927454737-20101130-01
      File Name: D:\Oracle_backup\daily.bat
      File Name: D:\Oracle_backup\ORA_DF736444481_S1577_S1
      File Name: D:\Oracle_backup\ORA_DF736444752_S1579_S1
      File Name: D:\Oracle_backup\ORA_DF736444810_S1580_S1
      File Name: D:\Oracle_backup\test.RMAN
      File Name: D:\Oracle_backup\tz_fall.bat
      File Name: D:\Oracle_backup\tz_fall.sql
      File Name: D:\Oracle_backup\tz_spring.bat
      File Name: D:\Oracle_backup\tz_spring.sql
      
      Do you really want to catalog the above files (enter YES or NO)? YES
      cataloging files...
      cataloging done
      
      List of Cataloged Files
      =======================
      File Name: D:\Oracle_backup\C-1927454737-20101130-00
      File Name: D:\Oracle_backup\C-1927454737-20101130-01
      File Name: D:\Oracle_backup\ORA_DF736444481_S1577_S1
      File Name: D:\Oracle_backup\ORA_DF736444752_S1579_S1
      File Name: D:\Oracle_backup\ORA_DF736444810_S1580_S1
      
      List of Files Which Where Not Cataloged
      =======================================
      File Name: D:\Oracle_backup\arcserve_daily.asx
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\daily.bat
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\test.RMAN
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\tz_fall.bat
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\tz_fall.sql
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\tz_spring.bat
        RMAN-07517: Reason: The file header is corrupted
      File Name: D:\Oracle_backup\tz_spring.sql
        RMAN-07517: Reason: The file header is corrupted
      
      RMAN> allocate channel for maintenance device type DISK;
      
      allocated channel: ORA_MAINT_DISK_1
      channel ORA_MAINT_DISK_1: sid=267 devtype=DISK
      
      RMAN> crosscheck backup;
      
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 recid=1638 stamp=7
      36619934
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 recid=1643 stamp=7
      36620313
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 recid=1648 stamp=7
      36620556
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 recid=1653 stamp=7
      36620763
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 recid=1658 stamp=7
      36620947
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-00 recid=1636 stamp=7
      36619934
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-00 recid=1641 stamp=7
      36620313
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-00 recid=1646 stamp=7
      36620556
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-00 recid=1651 stamp=7
      36620763
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-00 recid=1656 stamp=7
      36620947
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444752_S1579_S1 recid=1639 stamp=7
      36619934
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444752_S1579_S1 recid=1644 stamp=7
      36620313
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444752_S1579_S1 recid=1649 stamp=7
      36620556
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444752_S1579_S1 recid=1654 stamp=7
      36620763
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444752_S1579_S1 recid=1659 stamp=7
      36620947
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444810_S1580_S1 recid=1640 stamp=7
      36619935
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444810_S1580_S1 recid=1645 stamp=7
      36620313
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444810_S1580_S1 recid=1650 stamp=7
      36620556
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444810_S1580_S1 recid=1655 stamp=7
      36620763
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\ORA_DF736444810_S1580_S1 recid=1660 stamp=7
      36620947
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-01 recid=1637 stamp=7
      36619934
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-01 recid=1642 stamp=7
      36620313
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-01 recid=1647 stamp=7
      36620556
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-01 recid=1652 stamp=7
      36620763
      crosschecked backup piece: found to be 'AVAILABLE'
      backup piece handle=D:\ORACLE_BACKUP\C-1927454737-20101130-01 recid=1657 stamp=7
      36620947
      Crosschecked 25 objects
      
      
      RMAN> delete expired backup;
      
      
      RMAN> delete archivelog all;
      
      specification does not match any archive log in the recovery catalog
      
      RMAN> @D:\Oracle_backup\test.RMAN
      
      RMAN> RUN
      2> {
      3>   # allocate a channel to the tape device
      4>   ALLOCATE CHANNEL c1 DEVICE TYPE DISK PARMS='D:\Oracle_backup';
      5>
      6>   # rename the datafiles and online redo logs
      7>   SET NEWNAME FOR DATAFILE 1 TO '+DATA';
      8>   SET NEWNAME FOR DATAFILE 2 TO '+DATA';
      9>   SET NEWNAME FOR DATAFILE 3 TO '+DATA';
      10>   SET NEWNAME FOR DATAFILE 4 TO '+DATA';
      11>   SET NEWNAME FOR DATAFILE 5 TO '+DATA';
      12>   SET NEWNAME FOR DATAFILE 6 TO '+DATA';
      13>   SET NEWNAME FOR DATAFILE 7 TO '+DATA';
      14>   SET NEWNAME FOR DATAFILE 8 TO '+DATA';
      15>   SET NEWNAME FOR DATAFILE 9 TO '+DATA';
      16>   SET NEWNAME FOR DATAFILE 10 TO '+DATA';
      17>   SET NEWNAME FOR DATAFILE 11 TO '+DATA';
      18>   SET NEWNAME FOR DATAFILE 12 TO '+DATA';
      19>   SET NEWNAME FOR DATAFILE 13 TO '+DATA';
      20>   SET NEWNAME FOR DATAFILE 14 TO '+DATA';
      21>   SET NEWNAME FOR DATAFILE 15 TO '+DATA';
      22>   SET NEWNAME FOR DATAFILE 16 TO '+DATA';
      23>   SET NEWNAME FOR DATAFILE 17 TO '+DATA';
      24>
      25>   # Do a SET UNTIL to prevent recovery of the online logs
      26>   SET UNTIL SCN 566478276;
      27>   # restore the database and switch the datafile names
      28>   RESTORE DATABASE;
      29>   SWITCH DATAFILE ALL;
      30>
      31>   # recover the database
      32>   RECOVER DATABASE;
      33> }
      RMAN-06908: WARNING: operation will not run in parallel on the allocated channel
      s
      RMAN-06909: WARNING: parallelism require Enterprise Edition
      allocated channel: c1
      channel c1: sid=269 devtype=DISK
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET NEWNAME
      
      executing command: SET until clause
      
      Starting restore at 01-DEC-10
      
      channel c1: starting datafile backupset restore
      channel c1: specifying datafile(s) to restore from backup set
      restoring datafile 00001 to +DATA
      restoring datafile 00002 to +DATA
      restoring datafile 00003 to +DATA
      restoring datafile 00004 to +DATA
      restoring datafile 00005 to +DATA
      restoring datafile 00006 to +DATA
      restoring datafile 00007 to +DATA
      restoring datafile 00008 to +DATA
      restoring datafile 00009 to +DATA
      restoring datafile 00010 to +DATA
      restoring datafile 00011 to +DATA
      restoring datafile 00012 to +DATA
      restoring datafile 00013 to +DATA
      restoring datafile 00014 to +DATA
      restoring datafile 00015 to +DATA
      restoring datafile 00016 to +DATA
      restoring datafile 00017 to +DATA
      released channel: c1
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 12/01/2010 16:56:32
      ORA-19693: backup piece D:\ORACLE_BACKUP\ORA_DF736444481_S1577_S1 already includ
      ed
      
      RMAN> EXIT
      
      Recovery Manager complete.
      
      C:\Users\Administrator>
      the named file is about 11 GB and is the core of the DB. Can someone please tell me what I need to do to complete the restore?