1 2 3 Previous Next 116 Replies Latest reply: Aug 7, 2010 6:28 AM by Hemant K Chitale RSS

    RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

    user645399
      Dear Buddies,

      I am trying to recover upto a certain time and I used this SQL in my RMAN

      reset database to incarnation 1;

      run
      {
      set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
      restore database;
      recover database;
      }

      and I receive this error: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

      I thought changing the incarnation will solve the problem. I have only 2 incarnations, one which is used after the resetlogs which is number 2. So, I am using incarnation 1 now.

      How should I go about it?

      Thanks in advance.

      Nith
        • 1. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
          657203
          user645399 wrote:
          Dear Buddies,

          I am trying to recover upto a certain time and I used this SQL in my RMAN

          reset database to incarnation 1;

          run
          {
          set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
          restore database;
          recover database;
          }

          and I receive this error: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

          I thought changing the incarnation will solve the problem. I have only 2 incarnations, one which is used after the resetlogs which is number 2. So, I am using incarnation 1 now.

          How should I go about it?

          Thanks in advance.

          Nith
          Pls, post:
          RMAN>list incarnation;
          • 2. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
            user645399
            RMAN> list incarnation
            2> ;

            using target database control file instead of recovery catalog

            List of Database Incarnations
            DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
            ------- ------- -------- ---------------- --- ---------- ----------
            1 1 DEV 2455006062 PARENT 14434273 09-APR-10
            2 2 DEV 2455006062 CURRENT 14770169 09-APR-10


            RMAN> reset database to incarnation 1;


            RMAN> run
            2> {
            3> set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
            4> restore database;
            5> recover database;
            6> }

            executing command: SET until clause
            RMAN-00571: ===========================================================
            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
            RMAN-00571: ===========================================================
            RMAN-03002: failure of set command at 08/05/2010 13:32:35
            RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

            RMAN> list incarnation
            2> ;


            List of Database Incarnations
            DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
            ------- ------- -------- ---------------- --- ---------- ----------
            1 1 DEV 2455006062 CURRENT 14434273 09-APR-10
            2 2 DEV 2455006062 ORPHAN 14770169 09-APR-10

            Here it is.

            Nith

            Edited by: user645399 on Aug 5, 2010 1:43 PM
            • 3. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
              657203
              user645399 wrote:
              RMAN> list incarnation
              2> ;

              using target database control file instead of recovery catalog

              List of Database Incarnations
              DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
              ------- ------- -------- ---------------- --- ---------- ----------
              1 1 DEV 2455006062 PARENT 14434273 09-APR-10
              2 2 DEV 2455006062 CURRENT 14770169 09-APR-10


              RMAN> reset database to incarnation 1;


              RMAN> run
              2> {
              3> set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
              4> restore database;
              5> recover database;
              6> }

              executing command: SET until clause
              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              RMAN-03002: failure of set command at 08/05/2010 13:32:35
              RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

              RMAN> list incarnation
              2> ;


              List of Database Incarnations
              DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
              ------- ------- -------- ---------------- --- ---------- ----------
              1 1 DEV 2455006062 CURRENT 14434273 09-APR-10
              2 2 DEV 2455006062 ORPHAN 14770169 09-APR-10

              Here it is.

              Nith

              Edited by: user645399 on Aug 5, 2010 1:43 PM
              Plls, try:
              RMAN> Set dbid 2455006062;
              
              RMAN> reset database to incarnation 1;
              
              RMAN> RUN {
                shutdown force nomount;
                set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
                RESTORE CONTROLFILE; # not needed in catalog mode. Autobakup
                ALTER DATABASE MOUNT; 
                RESTORE DATABASE;
                RECOVER DATABASE;
              }
              • 4. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                user645399
                Dear Teymur Hajiyev,

                Thanks for your quick reply.

                May I know why I should include this line:

                RESTORE CONTROLFILE;

                My control file is intact. Is this because I should recover control file from the same backup?

                I am not running on catalogue mode.

                and is it necessary to perform "shutdown force nomount;" or is it okay if I perform "Shutdown; startup nomount;"

                Please advice.

                Nith
                • 5. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                  Rajesh Lathwal
                  >
                  is it okay if I perform "Shutdown; startup nomount;"
                  Yes ..

                  Regards
                  Rajesh

                  Edited by: Rajesh on Aug 5, 2010 11:40 AM
                  • 7. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                    Chinar
                    May I know why I should include this line:

                    RESTORE CONTROLFILE;

                    My control file is intact. Is this because I should recover control file from the same backup?
                    No your controlfile may is not intact but Teymur suggest do not use current controlfile(Need restore from backup),he suggest restore controlfile and try again.
                    I am not running on catalogue mode.

                    and is it necessary to perform "shutdown force nomount;" or is it okay if I perform "Shutdown; startup nomount;"
                    No that is not necessary.You can use "Shutdown; startup nomount".

                    In additionally if these do not help you then try
                    rman target / 
                    reset database to incarnation 2;
                     RUN {
                      shutdown force mount;
                      set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
                      RESTORE DATABASE;
                      RECOVER DATABASE;
                    }
                    • 8. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                      user645399
                      Chinar,

                      I have tried your suggestion.

                      RMAN> reset database to incarnation 1;

                      database reset to incarnation 1

                      RMAN> RUN {
                      2> shutdown;
                      3> startup mount;
                      4> set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
                      5> RESTORE DATABASE;
                      6> RECOVER DATABASE;
                      7> }

                      database dismounted
                      Oracle instance shut down

                      connected to target database (not started)
                      Oracle instance started
                      database mounted

                      Total System Global Area 1006632960 bytes

                      Fixed Size 1300444 bytes
                      Variable Size 952109092 bytes
                      Database Buffers 50331648 bytes
                      Redo Buffers 2891776 bytes

                      executing command: SET until clause
                      RMAN-00571: ===========================================================
                      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                      RMAN-00571: ===========================================================
                      RMAN-03002: failure of set command at 08/05/2010 14:18:50
                      RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

                      RMAN>

                      Will restore control file make a difference. I mean, if I were to add that line within the RUN, will it make a difference?

                      Thank You.

                      Nith
                      • 9. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                        Chinar
                        I am sorry i want said that reset database to incarnation 2 try again

                        Will restore control file make a difference. I mean, if I were to add that line within the RUN, will it make a difference?

                        Yes can difference.That is depend when you got backup of controlfile(It means depend controlfile information)
                        • 10. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                          657203
                          user645399 wrote:
                          Dear Teymur Hajiyev,

                          Thanks for your quick reply.

                          May I know why I should include this line:

                          RESTORE CONTROLFILE;

                          My control file is intact. Is this because I should recover control file from the same backup?

                          I am not running on catalogue mode.

                          and is it necessary to perform "shutdown force nomount;" or is it okay if I perform "Shutdown; startup nomount;"

                          Please advice.

                          Nith
                          Your current incarnation is 2 - that is current INCARNATION of database. when you are going back to previous INCARNATION, such INCARNATION must be current in database. In other words, that is the incarnation that was current at the target SCN (until time).
                          • 11. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                            user645399
                            With incarnation 2:

                            RMAN> reset database to incarnation 2;

                            database reset to incarnation 2

                            RMAN> RUN {
                            2> shutdown;
                            3> startup mount;
                            4> set until time "to_date('03-Aug-10 17:50:00','DD-MON-YYYY HH24:MI:SS')";
                            5> RESTORE DATABASE;
                            6> RECOVER DATABASE;
                            7> }

                            database dismounted
                            Oracle instance shut down

                            connected to target database (not started)
                            Oracle instance started
                            database mounted

                            Total System Global Area 1006632960 bytes

                            Fixed Size 1300444 bytes
                            Variable Size 952109092 bytes
                            Database Buffers 50331648 bytes
                            Redo Buffers 2891776 bytes

                            executing command: SET until clause
                            RMAN-00571: ===========================================================
                            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                            RMAN-00571: ===========================================================
                            RMAN-03002: failure of set command at 08/05/2010 14:27:36
                            RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

                            RMAN>
                            • 12. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                              user645399
                              Dear buddies,

                              Before I proceed with restoring my old control file( from an earlier backup)

                              I made a mess with my DB on 3rd of August 2010 around 6 pm. As I am continuously received errors that system01.dbf couldn't be restored/recovered, I choose to use an earlier backup. So, I move my recovery time from 6 pm .. to 5.00 pm. I took my last backup around 5.50 pm.

                              I did see messages stating restore the datafile from an earlier backup.

                              I believe still RMAN will recover the DB upto 5.50 pm (before the last backup?) using arch files?

                              Please guide me.

                              Nith

                              Edited by: user645399 on Aug 5, 2010 2:41 PM
                              • 13. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                                657203
                                user645399 wrote:
                                Dear buddies,

                                Before I proceed with restoring my old control file( from an earlier backup)

                                I made a mess with my DB on 3rd of August 2010 around 6 pm. As I am continuously received errors that system01.dbf couldn't be restored/recovered, I choose to use an earlier backup. So, I move my recovery time from 6 pm .. to 5.00 pm. I took my last backup around 5.50 pm.

                                I believe still RMAN will recover the DB upto 5.50 pm (before the last backup?) using arch files?

                                Please guide me.

                                Nith
                                Pls, post:

                                RMAN> list backup of database;

                                RMAN>list backup of archivelog all;

                                Do I understand you correctly: your database can not be opened now and you have backup taken at 5.50 PM but you are trying restore and recover until time 5.00 PM?
                                • 14. Re: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
                                  user645399
                                  Dear Teymur Hajiyev,

                                  I made some mess at 5.57pm so its better not use anything thats available after that.

                                  The backup was completed at 5.56.15 pm.

                                  I would like to recover anything that I could recover upto 5.56.15pm or so.

                                  Have I made it clear now.

                                  I tried to recover using UNTIL TIME and received messages stating system01 need to be restored from an earlier backup.

                                  Please advice on how I can go about this now.

                                  Thank You.

                                  Nith
                                  1 2 3 Previous Next