9 Replies Latest reply: Sep 2, 2013 11:23 PM by saurabh RSS

    restore database

    891445

      What does the below command do, when i don't specify ANY TIME or SCN.

       

      RMAN> RESTORE database;

      RMAN>Recover database;

       

      I want to know where does the recovery stop ?

       

      Does it ends at whatever backup it has taken ?  is it considered as Complete recovery ?

      Do we need to open with resetlogs?

        • 1. Re: restore database
          UserAL1178M

          In general, recovering from a database failure is a two-step process: restoring one or

          more database files from a backup location and applying archived and online redo

          log files to bring the entire database or individual datafile up to the specified System

          Change Number (SCN), which is usually the most recent SCN (the last committed

          transaction).

           

          The RESTORE command is the first step in any recovery process. When you issue

          a RESTORE command, RMAN retrieves one or more datafiles from disk or tape

          along with any archived redo log files required during the recovery operation.

           

          When you issue the RECOVER command, RMAN applies the committed changes

          in the archived and online redo log files to the restored datafiles.

          • 2. Re: restore database
            891445

            UserAL1178M,

             

            Thanks for your reply.  But i am not looking for explaintion on restore and recovery.

            What i am looking for is the END point, when i give restore/recover. 

             

            Does the recovery goes till the last archive backed up ??  Is that considered as complete recovery, so that i dont need to open resetlogs ??

            • 3. Re: restore database
              UserAL1178M

              If you read carefully the answer is there. Anyway i am giving them explicitly.

               

              The recovery stops at the most recent SCN (the last committed transaction).

               

              It is consider a complete recovery and not need to open with resetlogs.

               

              Keep in mind: Incomplete recovery must be open with resetlogs.

              • 4. Re: restore database
                saurabh

                yes the recovery goes till last archive we have backed up. It can be considered a complete recovery. Still we need to do an open resetlogs.

                because During RMAN backup we donot take backup of redo log file. Since we have done a complete recover but as we need to create redo log file so we do a resetlogs.

                • 5. Re: restore database
                  saurabh

                  can you explain why there is no need to open database in resetlogs when we do a restore of database.

                  then how the redo log will be created.

                  • 6. Re: restore database
                    UserAL1178M

                    saurabh wrote:

                     

                    yes the recovery goes till last archive we have backed up. It can be considered a complete recovery. Still we need to do an open resetlogs.

                    because During RMAN backup we donot take backup of redo log file. Since we have done a complete recover but as we need to create redo log file so we do a resetlogs.

                    Recovery process does not apply only archive logs. It applies online redo logs too until the most recent SCN (the last committed transaction) as i have mentioned.

                    • 7. Re: restore database
                      UserAL1178M

                      saurabh wrote:

                       

                      can you explain why there is no need to open database in resetlogs when we do a restore of database.

                      then how the redo log will be created.

                      One question: Is it clear what is resetlogs?

                      • 8. Re: restore database
                        UserAL1178M

                        RESETLOGS are needed when you do incomplete recovery. Once you open the database for read/write with RESETLOGS, the current log sequence is set to 1 and any redo information not applied during recovery is discarded. This prevents you from performing another recovery using a redo generated after the SCN or timestamp of your incomplete recovery.

                        • 9. Re: restore database
                          saurabh

                          Thanks for the explanation