5 Replies Latest reply: Nov 7, 2012 12:05 PM by CKPT RSS

    restore from the RMAN back up

    494959
      hi,

      We have code release.For this We will have rollback option is that take a complete RMAN backup and restore the backup in the same database.This is to check the whether we can able to recover the database before code release.

      Database 10.2.0.4
      OS AIX

      There is no change in locations of file (Control file,datafile,all). on the same server and same database.

      Just to recover from backup.

      can you tell me how we can achieve this.
        • 1. Re: restore from the RMAN back up
          Ora
          Handle:  Tippu    
          Status Level:  Newbie (40)  
          Registered:  Mar 2, 2006  
          Total Posts:  207  
          Total Questions:  67 (63 unresolved)  
          Name  Tippu  
          Location  Bangalore  
          Why so many unanswered questions?
          • 2. Re: restore from the RMAN back up
            Ora
            This is to check the whether we can able to recover the database before code release.
            Do you mean you want to validate the backup files before restoring them?
            If thats the case then refer validating database files and backup:

            http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmvalid.htm#i1031282
            • 3. Re: restore from the RMAN back up
              mseberg
              Hello;

              RMAN point in time recovery.

              Example
              Connect to RMAN
              
              RMAN> startup mount;
              
              
              RMAN> restore database until time "to_date('5-NOV-2012 11:23:00','dd-mon-rrrr hh24:mi:ss')";
              
              
              RMAN> recover database until time "to_date('5-NOV-2012 11:23:00','dd-mon-rrrr hh24:mi:ss')";
              
              
              RMAN> alter database open resetlogs;
              
              Note:
              
              You should perform a full backup.
              Best Regards

              mseberg
              • 4. Re: restore from the RMAN back up
                LaserSoft
                Hi

                Some useful notes......If you are using rman backup.

                RMAN> restore database validate;

                Use the above command on regular basis as part of testing viability of your backups.

                The Restore....Validate command will check verify whether your backup free from physical corruption and will also check to verify whether any required archived log file backup sets are available and intact.

                Most advantage is "These commands do not actually restore any files"

                Thanks
                LaserSoft
                • 5. Re: restore from the RMAN back up
                  CKPT
                  VALIDATE to verify that the backups required to restore the specified files are in good state or not and on top of that you can see Preview ase below
                  RMAN> restore database preview;
                  
                  Starting restore at 07-NOV-12
                  using target database control file instead of recovery catalog
                  allocated channel: ORA_DISK_1
                  channel ORA_DISK_1: SID=26 device type=DISK
                  
                  
                  List of Backup Sets
                  ===================
                  
                  
                  BS Key  Type LV Size       Device Type Elapsed Time Completion Time
                  ------- ---- -- ---------- ----------- ------------ ---------------
                  20      Full    4.06G      DISK        00:03:50     07-NOV-12
                          BP Key: 20   Status: AVAILABLE  Compressed: NO  Tag: TAG20121107T173727
                          Piece Name: /u01/app/oracle/flash_recovery_area/TURKEY_UN/backupset/2012_11_07/o1_mf_nnndf_TAG20121107T173727_89nmr07v_.bkp
                    List of Datafiles in backup set 20
                    File LV Type Ckp SCN    Ckp Time  Name
                    ---- -- ---- ---------- --------- ----
                    1       Full 3925145    07-NOV-12 /u01/app/oracle/oradata/orcl/system01.dbf
                    2       Full 3925145    07-NOV-12 /u01/app/oracle/oradata/orcl/sysaux01.dbf
                    3       Full 3925145    07-NOV-12 /u01/app/oracle/oradata/orcl/undotbs01.dbf
                    4       Full 3925145    07-NOV-12 /u01/app/oracle/oradata/orcl/users01.dbf
                    5       Full 3925145    07-NOV-12 /u01/app/oracle/oradata/orcl/example01.dbf
                  using channel ORA_DISK_1
                  
                  1443    1    628     A 07-NOV-12
                          Name: /u01/app/oracle/flash_recovery_area/TURKEY_UN/archivelog/2012_11_07/o1_mf_1_628_89o8bm21_.arc
                  
                  Media recovery start SCN is 3925145
                  "Recovery must be done beyond SCN 3925145 to clear datafile fuzziness"
                  Finished restore at 07-NOV-12
                  
                  RMAN>