This discussion is archived
1 2 Previous Next 28 Replies Latest reply: Nov 17, 2012 8:51 AM by Shivananda Rao Go to original post RSS
  • 15. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    thanks, will read this . created a tar with oracle support, nothing said from them, they are not helping at all.
  • 16. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    the note you supplied shows fixed on 11.2.0.3. we are at 11.2.0.3.
  • 17. Re: how to restore rman backed up backup pieces?
    mseberg Guru
    Currently Being Moderated
    Can you post your entire restore script?

    Note that apply to your version :

    RMAN RESTORE FAILS WITH RMAN-06023 BUT THERE ARE BACKUPS AVAILABLE [ID 965122.1]

    mseberg

    Edited by: mseberg on Nov 17, 2012 9:23 AM
  • 18. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    run {
    duplicate database to TST
    UNTIL TIME "TO_DATE('11-14-2012 2:00:00', 'MM/DD/YYYY HH24:MI:SS')"
    backup location '/stage';
    NOFILENAMECHECK;
    }
  • 19. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    basically this steps:

    1). took a full backup of source on Nov. 15
    2). scp to stage on auxiliary
    3). try to duplicate to point int ime to Nov. 14.

    Is this possible.
  • 20. Re: how to restore rman backed up backup pieces?
    mseberg Guru
    Currently Being Moderated
    You have to use SET NEWNAME if you are doing an RMAN RESTORE.

    The reason I posted the link to restore without catalog is, it shows this.

    You should be able to add UNTIL TIME to this if your backups are correct.

    Script from my test :
    CONNECT TARGET /
    STARTUP NOMOUNT;
    SET DBID 3754763357; #DBID of PROD database
    
    RUN
    {
       ALLOCATE CHANNEL c1 DEVICE TYPE disk format '/u03/oradata/RCATALOG_rman';
       RESTORE CONTROLFILE FROM '/u03/oradata/RCATALOG_rman/sb_t790762003_s85_p1';
       ALTER DATABASE MOUNT;
       SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/RECLONE/system01.dbf';
       SET NEWNAME FOR DATAFILE 2 TO ' /u01/app/oracle/oradata/RCATALOG/sysaux01.dbf';
       SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/RECLONE/undotbs01.dbf';
       SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/RECLONE/users01.dbf';
       SET NEWNAME FOR DATAFILE 5 TO '/u02/oradata/RECLONE/rman02.dbf';
       SET NEWNAME FOR DATAFILE 6 TO '/u02/oradata/RECLONE/things01.dbf';
       SET NEWNAME FOR DATAFILE 7 TO '/u02/oradata/RECLONE/otn01.dbf';
       SET NEWNAME FOR DATAFILE 8 TO '/u01/oradata/RECLONE/app_idx01.dbf';
       SET NEWNAME FOR DATAFILE 9 TO '/u01/oradata/RECLONE/app_dat01.dbf';
       SET NEWNAME FOR DATAFILE 10 TO '/u01/app/oracle/oradata/RECLONE/audit_aux01.dbf';
       SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle/oradata/RECLONE/temp01.dbf';
       RESTORE DATABASE;
       SWITCH DATAFILE ALL;
       RECOVER DATABASE;
       release channel c1;
    }
    ALTER DATABASE OPEN RESETLOGS;
    
    
    exit
    EOF
    Figured the NOCATALOG example gave you the most options.

    Try a control file restore only using a script like above as a simple test of the method.


    Best Regards

    mseberg

    Edited by: mseberg on Nov 17, 2012 9:38 AM
  • 21. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    on auxiliary , if use your script, how to tell where the backup pieces are?
  • 22. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    here is duplicate log,
    alter clone database mount;
    }
    executing Memory Script

    sql statement: alter system set control_files = ''+DAT/tst/controlfile/current.400.799593399'', ''+FRA/tst/controlfile/current.2223.799593399'' comment= ''Set by RMAN'' scope=spfile

    sql statement: alter system set db_name = ''PRD'' comment= ''Modified by RMAN duplicate'' scope=spfile

    sql statement: alter system set db_unique_name = ''TST'' comment= ''Modified by RMAN duplicate'' scope=spfile

    Oracle instance shut down

    Oracle instance started

    Total System Global Area 5344731136 bytes

    Fixed Size 2237776 bytes
    Variable Size 973081264 bytes
    Database Buffers 4362076160 bytes
    Redo Buffers 7335936 bytes

    Starting restore at 17-NOV-12
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=41 device type=DISK

    channel ORA_AUX_DISK_1: copied control file copy
    output file name=+_DAT/tst/controlfile/current.400.799593399
    output file name=+_FRA/tst/controlfile/current.2223.799593399
    Finished restore at 17-NOV-12

    database mounted
    released channel: ORA_AUX_DISK_1
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=41 device type=DISK
    allocated channel: ORA_AUX_DISK_2
    channel ORA_AUX_DISK_2: SID=316 device type=DISK
    allocated channel: ORA_AUX_DISK_3
    channel ORA_AUX_DISK_3: SID=354 device type=DISK
    allocated channel: ORA_AUX_DISK_4
    channel ORA_AUX_DISK_4: SID=276 device type=DISK
    allocated channel: ORA_AUX_DISK_5
    channel ORA_AUX_DISK_5: SID=392 device type=DISK
    allocated channel: ORA_AUX_DISK_6
    channel ORA_AUX_DISK_6: SID=431 device type=DISK
    allocated channel: ORA_AUX_DISK_7
    channel ORA_AUX_DISK_7: SID=472 device type=DISK
    allocated channel: ORA_AUX_DISK_8
    channel ORA_AUX_DISK_8: SID=510 device type=DISK
    RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

    contents of Memory Script:
    {
    set until scn 91214876415;
    sql clone 'alter database flashback off';
    set newname for datafile 1 to
    "+_dat";
    set newname for datafile 2 to
    "+_dat";
    set newname for datafile 3 to
    "+_dat";
    set newname for datafile 4 to
    "+_dat";
    set newname for datafile 5 to
    "+_dat";
    set newname for datafile 6 to
    "+_dat";
    set newname for datafile 8 to
    "+_dat";
    set newname for datafile 9 to
    "+_dat";
    set newname for datafile 10 to
    "+_dat";
    set newname for datafile 11 to
    "+_dat";
    set newname for datafile 12 to
    "+_dat";
    set newname for datafile 13 to
    "+_dat";
    set newname for datafile 14 to
    "+_dat";
    set newname for datafile 15 to
    "+_dat";
    set newname for datafile 16 to
    "+_dat";
    set newname for datafile 17 to
    "+_dat";
    set newname for datafile 18 to
    "+_dat";
    set newname for datafile 19 to
    "+_dat";
    set newname for datafile 20 to
    "+_dat";
    set newname for datafile 21 to
    "+_dat";
    set newname for datafile 22 to
    "+_dat";
    set newname for datafile 23 to
    "+_dat";
    set newname for datafile 24 to
    "+_dat";
    set newname for datafile 25 to
    "+_dat";
    set newname for datafile 26 to
    "+_dat";
    set newname for datafile 27 to
    "+_dat";
    set newname for datafile 28 to
    "+_dat";
    set newname for datafile 29 to
    "+_dat";
    set newname for datafile 30 to
    "+_dat";
    set newname for datafile 31 to
    "+_dat";
    set newname for datafile 32 to
    "+_dat";
    set newname for datafile 33 to
    "+_dat";
    set newname for datafile 34 to
    "+_dat";
    set newname for datafile 35 to
    "+_dat";
    set newname for datafile 36 to
    "+_dat";
    set newname for datafile 37 to
    "+_dat";
    set newname for datafile 38 to
    "+_dat";
    set newname for datafile 39 to
    "+_dat";
    set newname for datafile 40 to
    "+_dat";
    set newname for datafile 41 to
    "+_dat";
    set newname for datafile 42 to
    "+_dat";
    set newname for datafile 43 to
    "+_dat";
    set newname for datafile 44 to
    "+_dat";
    set newname for datafile 45 to
    "+_dat";
    set newname for datafile 46 to
    "+_dat";
    set newname for datafile 47 to
    "+_dat";
    set newname for datafile 48 to
    "+_dat";
    set newname for datafile 49 to
    "+_dat";
    set newname for datafile 50 to
    "+_dat";
    set newname for datafile 51 to
    "+_dat";
    set newname for datafile 52 to
    "+_dat";
    set newname for datafile 53 to
    "+_dat";
    set newname for datafile 54 to
    "+_dat";
    set newname for datafile 55 to
    "+_dat";
    set newname for datafile 56 to
    "+_dat";
    set newname for datafile 57 to
    "+_dat";
    set newname for datafile 58 to
    "+_dat";
    set newname for datafile 59 to
    "+_dat";
    set newname for datafile 60 to
    "+_dat";
    set newname for datafile 61 to
    "+_dat";
    set newname for datafile 62 to
    "+_dat";
    set newname for datafile 63 to
    "+_dat";
    set newname for datafile 64 to
    "+_dat";
    set newname for datafile 65 to
    "+_dat";
    set newname for datafile 66 to
    "+_dat";
    set newname for datafile 67 to
    "+_dat";
    restore
    clone database
    ;
    }
    executing Memory Script

    executing command: SET until clause

    sql statement: alter database flashback off

    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 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 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 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

    Starting restore at 17-NOV-12
    using channel ORA_AUX_DISK_1
    using channel ORA_AUX_DISK_2
    using channel ORA_AUX_DISK_3
    using channel ORA_AUX_DISK_4
    using channel ORA_AUX_DISK_5
    using channel ORA_AUX_DISK_6
    using channel ORA_AUX_DISK_7
    using channel ORA_AUX_DISK_8

    Oracle instance started

    Total System Global Area 5344731136 bytes

    Fixed Size 2237776 bytes
    Variable Size 973081264 bytes
    Database Buffers 4362076160 bytes
    Redo Buffers 7335936 bytes

    contents of Memory Script:
    {
    sql clone "alter system set db_name =
    ''TST'' comment=
    ''Reset to original value by RMAN'' scope=spfile";
    sql clone "alter system reset db_unique_name scope=spfile";
    shutdown clone immediate;
    }
    executing Memory Script

    Errors in memory script
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01507: database not mounted
    ORA-06512: at "SYS.X$DBMS_RCVMAN", line 13466
    ORA-06512: at line 1
    RMAN-05556: not all datafiles have backups that can be recovered to SCN 91214876415
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 67 found to restore
    RMAN-06023: no backup or copy of datafile 66 found to restore
    RMAN-06023: no backup or copy of datafile 65 found to restore
    RMAN-06023: no backup or copy of datafile 64 found to restore
    RMAN-06023: no backup or copy of datafile 63 found to restore
    RMAN-06023: no backup or copy of datafile 62 found to restore
    RMAN-06023: no backup or copy of datafile 61 found to restore
    RMAN-06023: no backup or copy of datafile 60 found to restore
    RMAN-06023: no backup or copy of datafile 59 found to restore
    RMAN-06023: no backup or copy of datafile 58 found to restore
    RMAN-06023: no backup or copy of datafile 57 found to restore
    RMAN-06023: no backup or copy of datafile 56 found to restore
    RMAN-06023: no backup or copy of datafile 55 found to restore
    RMAN-06023: no backup or copy of datafile 54 found to restore
    RMAN-06023: no backup or copy of datafile 53 found to restore
    RMAN-06023: no backup or copy of datafile 52 found to restore
    RMAN-06023: no backup or copy of datafile 51 found to restore
    RMAN-06023: no backup or copy of datafile 50 found to restore
    RMAN-06023: no backup or copy of datafile 49 found to restore
    RMAN-06023: no backup or copy of datafile 48 found to restore
    RMAN-06023: no backup or copy of datafile 47 found to restore
    RMAN-06023: no backup or copy of datafile 46 found to restore
    RMAN-06023: no backup or copy of datafile 45 found to restore
    RMAN-06023: no backup or copy of datafile 44 found to restore
    RMAN-06023: no backup or copy of datafile 43 found to restore
    RMAN-06023: no backup or copy of datafile 42 found to restore
    RMAN-06023: no backup or copy of datafile 41 found to restore
    RMAN-06023: no backup or copy of datafile 40 found to restore
    RMAN-06023: no backup or copy of datafile 39 found to restore
    RMAN-06023: no backup or copy of datafile 38 found to restore
    RMAN-06023: no backup or copy of datafile 37 found to restore
    RMAN-06023: no backup or copy of datafile 36 found to restore
    RMAN-06023: no backup or copy of datafile 35 found to restore
    RMAN-06023: no backup or copy of datafile 34 found to restore
    RMAN-06023: no backup or copy of datafile 33 found to restore
    RMAN-06023: no backup or copy of datafile 32 found to restore
    RMAN-06023: no backup or copy of datafile 31 found to restore
    RMAN-06023: no backup or copy of datafile 30 found to restore
    RMAN-06023: no backup or copy of datafile 29 found to restore
    RMAN-06023: no backup or copy of datafile 28 found to restore
    RMAN-06023: no backup or copy of datafile 27 found to restore
    RMAN-06023: no backup or copy of datafile 26 found to restore
    RMAN-06023: no backup or copy of datafile 25 found to restore
    RMAN-06023: no backup or copy of datafile 24 found to restore
    RMAN-06023: no backup or copy of datafile 23 found to restore
    RMAN-06023: no backup or copy of datafile 22 found to restore
    RMAN-06023: no backup or copy of datafile 21 found to restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 19 found to restore
    RMAN-06023: no backup or copy of datafile 18 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 16 found to restore
    RMAN-06023: no backup or copy of datafile 15 found to restore
    RMAN-06023: no backup or copy of datafile 14 found to restore
    RMAN-06023: no backup or copy of datafile 13 found to restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 9 found to restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    RMAN-06023: no backup or copy of datafile 6 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-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/17/2012 13:17:36
    RMAN-05501: aborting duplication of target database

    RMAN>
  • 23. Re: how to restore rman backed up backup pieces?
    mseberg Guru
    Currently Being Moderated
    Hello again;

    Note the : ( This is form a test I did on this forum August 8th 2012 - The created the setup on my test system and it worked - I created the document from my notes )
    RESTORE CONTROLFILE FROM '/u03/oradata/RCATALOG_rman/sb_t790762003_s85_p1';
    Also

    "Restrictions and Usage Notes" in the documentation on the DUPLICATE DATABASE command.
    If the target and duplicate databases reside on different hosts, then you must do one of the following tasks for duplication to be successful:
     
    Move backups and disk copies from the target host to the duplicate host to the same location as the target host so that the path names are identical
     
    Move backups and disk copies from the target host to the duplicate host to a new location (so that the path names are different), and then CATALOG them.
     
    Make sure that all backups and copies (disk or sbt) on the target host are remotely accessible from the duplicate host. Make sure that the archived redo logs are available in the expected location in the new host.
    So my example is a restore, not a duplicate, but the results are the same.

    Best Regards

    mseberg
  • 24. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    cannot restore controlfile because db is no mount.
  • 25. Re: how to restore rman backed up backup pieces?
    mseberg Guru
    Currently Being Moderated
    It has to be NOMOUNT for a control file restore.

    Note the first part of my script :
    CONNECT TARGET /
    STARTUP NOMOUNT;
    SET DBID 3754763357; #DBID of PROD database
    
    RUN
    {
       ALLOCATE CHANNEL c1 DEVICE TYPE disk format '/u03/oradata/RCATALOG_rman';
       RESTORE CONTROLFILE FROM '/u03/oradata/RCATALOG_rman/sb_t790762003_s85_p1';
       ALTER DATABASE MOUNT;
    Best Regards

    mseberg
  • 26. Re: how to restore rman backed up backup pieces?
    CKPT Guru
    Currently Being Moderated
    9233598 wrote:
    on auxiliary , if use your script, how to tell where the backup pieces are?
    After mount you have to catalog the backup pieces if they are not in the same location as production.

    You can split this procedure in to two formats

    1) Restore controlfile from the backup pieces
    CONNECT TARGET /
    STARTUP NOMOUNT;
    RMAN> SET DBID 3754763357; #DBID of PROD database
    - Ensure the below controlfile location is correct.
    RMAN> RESTORE CONTROLFILE FROM '/u03/oradata/RCATALOG_rman/sb_t790762003_s85_p1';
    RMAN> sql 'alter database mount';
    2) Now catalog the backup, if they are different than source location
    - This step you can perform if you mounted database,
    Note:- You cannot perform this step if your auxiliary instance is in NOMOUNT.
    RMAN> catalog start with 'backups locations';
    - Give "YES" to catalog them.


    3) now do the procedure to restore all the data files as per the script provided by Micheal Seberg.
    If you want to perform Time you can include in case of recovery, Of course just restore as of now as below.
    RUN
    {
       SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/RECLONE/system01.dbf';
       SET NEWNAME FOR DATAFILE 2 TO ' /u01/app/oracle/oradata/RCATALOG/sysaux01.dbf';
       SET NEWNAME FOR DATAFILE 3 TO '/u01/app/oracle/oradata/RECLONE/undotbs01.dbf';
       SET NEWNAME FOR DATAFILE 4 TO '/u01/app/oracle/oradata/RECLONE/users01.dbf';
       SET NEWNAME FOR DATAFILE 5 TO '/u02/oradata/RECLONE/rman02.dbf';
       SET NEWNAME FOR DATAFILE 6 TO '/u02/oradata/RECLONE/things01.dbf';
       SET NEWNAME FOR DATAFILE 7 TO '/u02/oradata/RECLONE/otn01.dbf';
       SET NEWNAME FOR DATAFILE 8 TO '/u01/oradata/RECLONE/app_idx01.dbf';
       SET NEWNAME FOR DATAFILE 9 TO '/u01/oradata/RECLONE/app_dat01.dbf';
       SET NEWNAME FOR DATAFILE 10 TO '/u01/app/oracle/oradata/RECLONE/audit_aux01.dbf';
       SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle/oradata/RECLONE/temp01.dbf';
       RESTORE DATABASE;
       SWITCH DATAFILE ALL;
    }
    4) Recover database.

    Examples:-
    SQL> recover database using backup controlfile until time '28-Feb-2008 10:00:00'
    SQL> RECOVER DATABASE UNTIL TIME to_date('2010-05-08:08:42:00','YYYY-MM-DD:HH24:MI:SS');

    HTH.
  • 27. Re: how to restore rman backed up backup pieces?
    9233598 Newbie
    Currently Being Moderated
    Great . let me try.
  • 28. Re: how to restore rman backed up backup pieces?
    Shivananda Rao Guru
    Currently Being Moderated
    Hello,

    Take a look at this http://shivanandarao.wordpress.com/2012/04/19/duplicating-primary-database-to-a-new-host-without-connecting-to-the-primary-database-in-oracle-10g11g/

    I guess that I posted the same link in my very 1st post on this thread. Hope it helps !!
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points