2

I'll start by saying it has been YEARS since I restored a database with RMAN. That said, I'm trying to restore data provided by a partner company for us to import into our database.

Our database isn't Oracle, but we have an Oracle instance set up for the transition. I was successfully able to restore the initial dataset to an empty database, but we needed a few more data tables that were included in the latest backup set. I would prefer not to delete the database, DBS, but will if this isn't resolved soon.

I have two backup pieces in my catalog, one for the control file and the other for the datafiles. Both have the same tag. When I try to restore the database to that tag, I get the results below.

RMAN> list backupset 14;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14      Full    18.87G     DISK        00:00:00     10-AUG-17
        BP Key: 31   Status: AVAILABLE  Compressed: NO  Tag: COLD_20170810
        Piece Name: C:\APP\ORACLE\ADMIN\DBS_20170810_0GSBHQCU_1_1.BK
  List of Datafiles in backup set 14
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full XXXXXXXXXXX 10-AUG-17 C:\APP\ORACLE\ORADATA\DBS\SYSTEM01.DBF
  2       Full XXXXXXXXXXX 10-AUG-17 C:\APP\ORACLE\ORADATA\DBS\SYSAUX01.DBF
  3       Full XXXXXXXXXXX 10-AUG-17 C:\APP\ORACLE\ORADATA\DBS\UNDOTBSP01.DBF
  4       Full XXXXXXXXXXX 10-AUG-17 C:\APP\ORACLE\ORADATA\DBS\USERS01.DBF
  5       Full XXXXXXXXXXX 10-AUG-17 C:\APP\ORACLE\ORADATA\DBS\DATABIG.DBF

RMAN> restore database from tag 'COLD_20170810';

Starting restore at 14-AUG-17
using channel ORA_DISK_1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/14/2017 16:00:59
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN>

I set up the run file below:

RUN {
    SET NEWNAME FOR DATAFILE 1 TO "C:\APP\ORACLE\ORADATA\DBS\SYSTEM01.DBF";
    SET NEWNAME FOR DATAFILE 2 TO "C:\APP\ORACLE\ORADATA\DBS\SYSAUX01.DBF";
    SET NEWNAME FOR DATAFILE 3 TO "C:\APP\ORACLE\ORADATA\DBS\UNDOTBSP01.DBF";
    SET NEWNAME FOR DATAFILE 4 TO "C:\APP\ORACLE\ORADATA\DBS\USERS01.DBF";
    SET NEWNAME FOR DATAFILE 5 TO "C:\APP\ORACLE\ORADATA\DBS\DATABIG.DBF";

    #SQL "ALTER DATABASE RENAME FILE ''G:\ORADATA\DBS\redo01.log'' TO ''C:\app\Oracle\ORADATA\DBS\redo01.log'' ";
    #SQL "ALTER DATABASE RENAME FILE ''G:\ORADATA\DBS\redo02.log'' TO ''C:\app\Oracle\ORADATA\DBS\redo02.log'' ";
    #SQL "ALTER DATABASE RENAME FILE ''G:\ORADATA\DBS\redo03.log'' TO ''C:\app\Oracle\ORADATA\DBS\redo03.log'' ";

    set until time "to_date('10-AUG-2017 00:00:00','DD-MON-YYYY HH24:MI:SS')";

    RESTORE DATABASE FROM TAG 'COLD_20170810';
    SWITCH DATAFILE ALL;
    RECOVER DATABASE;
}

And I get the same results.

Any guidance will be appreciated.

2
  • It sounds to me that you want to restore a newer backup of the previous incarnation, but the start of the current incarnation is before the time this backup was taken. Post the output of list incarnation. If the reset time of the current incarnation is before the time this backup was taken, you will need to `reset incarnation to X;', where X is the incarnation key. Aug 14, 2017 at 21:59
  • @BalazsPapp I was so close. I knew it had to be something with the incarnation, but couldn't find a definitive answer out on the web. Thanks you so much. If you post this as an answer, I'll accept it. Aug 15, 2017 at 13:32

1 Answer 1

1

It sounds to me that you want to restore a newer backup of the previous incarnation, but the start of the current incarnation is before the time this backup was taken.

Check the output of list incarnation;. If the reset time of the current incarnation is before the time this backup was taken, you will need to reset incarnation to X;, where X is the incarnation key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.