5 Replies Latest reply: Mar 25, 2014 9:54 PM by Azhar MZ RSS

    Rebuild standby DB in case of same DB ID and different DB ID.

    Azhar MZ

      I have two interesting case:

       

      Case number one.

       

      Without my knowledge, someone rebuild primary and secondary database, but did nothing on the standby db.

      The database name is the same, but database is different from the standby database. So now I have to rebuild the standby to allow it to sync with PRIMARY.

       

       

      Case number two.

       

      Also without my knowledge, someone restore PRIMARY with RESETLOG. With other problems too, causing Oracle support to suggest me to rebuild STANDBY.

      But in this case, the database name AND database ID are still the same.

       

      So what is the best way to do both of this? This is not building, but rebuilding (so Oracle, Dataguard, etc, already there. The problem is just that they are not sync/ sending archive to be applied).

       

      Thanks.

        • 1. Re: Rebuild standby DB in case of same DB ID and different DB ID.
          Azhar MZ

          I can't edit (or am i missing something) but the first case

           

          "The database name is the same, but database is different" should be

           

          "The database name is the same, but database ID different"

          • 2. Re: Rebuild standby DB in case of same DB ID and different DB ID.
            mseberg

            Hello;

             

            Will depend upon the version. If Oracle 11 or higher I would consider Duplicate Standby from Active database.

             

            RMAN duplicate will also work with 10, but you generally move the backup to the Standby server.

             

            But  RMAN duplicate is the way I would go.

             

            Best Regards

             

            mseberg

            • 3. Re: Rebuild standby DB in case of same DB ID and different DB ID.
              Azhar MZ

              I have been advised to go through RMAN route.

               

              I guess its the same even if DBID is the same or not?

              • 4. Re: Rebuild standby DB in case of same DB ID and different DB ID.
                mseberg

                RMAN Duplicate will handle the DBID issue for you. You replace the standby with this method.

                 

                Best Regards

                 

                mseberg

                • 5. Re: Rebuild standby DB in case of same DB ID and different DB ID.
                  Azhar MZ

                  OK. Now I have several problems. And maybe learn new stuff too.

                   

                  Case 1:

                   

                  There are 1 new db and the old one, with the old ID that I want to replace. The new db full backup is around 3 gig, but full backup with archive log is around 12 gig. This is because there are around 3 month worth of archive log.

                   

                  The old one can't be opened, it gives this error

                   

                  ORA-10458: standby database requires recovery

                  ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

                  ORA-01110: data file 1: '+DRDATA1/dsgkles/datafile/system.326.837647047'

                   

                  This is causing active standby duplication won't work.

                   

                  How do I make above database can be opened? Note, I doesn't need the db anymore and it will be replaced. It uses ASM, but ASM can't be used (another story).

                   

                  Case 2:

                   

                  There is two data base. New and old.

                   

                  The new one can't be opened due to full FRA with 3 month worth of archive log. The old one can be opened. The problem here is that the SYS and SYSTEM password have been changed, its not the same between those two (hence 3 month worth of archive log), and nobody knows it. Can sign in and mouth with / as sysdba, but since it can't be opened, no ALTER or changing password.

                   

                  Full db backup is around 3 gig, but full backup with archive log is more than 13 gig obviously, the space just filled and rman stopped.

                   

                  So, if I plan to rebuild the old db, do I need to backup with archivelog, or just full backup only?

                   

                  Thanks.

                   

                  Case 3:

                   

                  I managed to duplicate using active db. Now I'm trying to make DR work. Been googling around, but none with clear answer. Oracle source is too much text and parameters info but lack of sample code. Sad really.