10 Replies Latest reply: Feb 8, 2014 2:25 PM by 1006594 RSS

    standby redo log deleted

    1006594

      Oracle 11gR2 (11.2.0.3) Linux x86_64

       

      All a silly mistake was made. While re-creating standby redo logfiles, I managed to remove/delete (rm command) the current standby redo log file (before it has finished applying) from the OS. Now I see in the alert log:

       

      ORA-00313: open failed for members of log group 7 of thread 1
      ORA-00312: online log 7 thread 1: ..../standby_redo7.log'
      ORA-27037: unable to obtain file status
      Linux-x86_64 Error: 2: No such file or directory
      Additional information: 3
      

       

      What are my options at this point? Will I have any unapplied transactions? The apply process seems to be just moving on fine. Where am I folks?

       

      Thank you all.

        • 1. Re: standby redo log deleted
          Baris Yildirim

          Hi,

          try the below. I am not sure,but maybe it works

           

          --Switch the redolog transport way from LGWR to ARCH on Primary, it makes your standby redo log file's status INACTIVE,

          --switch over on primary

          --drop standby logfile group

               "alter database drop logfile group ......."

          --create standby logfile groups

          --switch from ARCH to LGWR

           

          Regards

          • 2. Re: standby redo log deleted
            teits

            Hi,

             

            Lucky you , standby db will use your archivelog files. In the senario that you do not have a valid standby log configuration, archivelog files will be used. That means there will be more delay before your redo data is applied on standby.

            You should recreate the deleted standby log files.

             

            Hth

            Tobi

            • 3. Re: standby redo log deleted
              1006594

              Hi Tobi,

               

              Thanks for your response.

               

              How do you suggest I re-create the deleted log file? If I try to create the deleted logfile, I get the following error:

               

              alter database add standby logfile group 7 (<path to logfile>) size 500M;

               

              ORA-01156: recovery or flashback in progress may need access to files

              • 4. Re: standby redo log deleted
                1006594

                If I stop the recovery process and then try to add the same log, it tells me it already exists.

                 

                alter database recover managed standby database cancel;

                 

                alter database add standby logfile group 7 ('<path to deleted logfile>') size 500M;

                ORA-01184: logfile group 7 already exists

                 

                alter database add standby logfile member '<path to deleted logfile>' to group 7;

                 

                ORA-00313: open failed for members of log group 7 of thread 1

                ORA-00312: online log 7 thread 1: '<path to deleted logfile>'

                ORA-27037: unable to obtain file status

                Linux-x86_64 Error: 2: No such file or directory

                Additional information: 3

                 

                 

                alter database add standby logfile member '<path to deleted logfile>' to group 7;

                 

                ORA-01577: cannot add log file '<path to deleted logfile>' - file already part of database

                • 5. Re: standby redo log deleted
                  Baris Yildirim

                  Hi,

                   

                  Did you try my suggestion?

                   

                  Regards

                  • 6. Re: standby redo log deleted
                    Baris Yildirim

                    the below resolves your problem.

                     

                    -- shutdown immediate standby

                    -- create a new standby control file on Primary

                    -- copy it to standby

                    -- set if necessary, db_file_name_convert,log_file_name_convert parameters

                    -- if there are datafiles which has been created on standby using OMF (after the last standby control file creation), you have to run rman catalog command to add them as datafile copy and switch them

                    -- open your standby using new controlfile

                    -- and now you can add standby logfile groups

                     

                    Regards

                    • 7. Re: standby redo log deleted
                      1006594

                      Hi

                       

                      Doing a switchover in our environment is currently not an option.

                      • 8. Re: standby redo log deleted
                        Baris Yildirim

                        Hi,

                         

                        my last suggestion is a quite solution, but firstly back up current standby log file

                         

                        Regards

                        • 9. Re: standby redo log deleted
                          teits

                          Hi,

                           

                          1. ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

                           

                           

                           

                          2. ALTER DATABASE CLEAR LOGFILE GROUP 7;

                           

                           

                           

                          3.  ALTER DATABASE DROP  STANDBY LOGFILE GROUP 7;

                           

                           

                           

                          4. ALTER DATABASE ADD STANDBY LOGFILE GROUP 7;  OR ALTER DATABASE ADD STANDBY LOGFILE MEMBER '<PATH TO DELETED LOGFILE>' TO GROUP 7;

                           

                           

                           

                          5. START REDO APPLY:  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

                           

                          HTH

                          Tobi

                          • 10. Re: standby redo log deleted
                            1006594

                            Perfect! Thank you Tobi.