6 Replies Latest reply: Sep 21, 2012 2:15 AM by user13328398 RSS

    accidently deleted standby logfiles on primary site

    vivalavida
      Hi ,

      on the primary site the standby redo log groups 4, 5 and 6 got accidentily deleted:

      ALTER DATABASE DROP LOGFILE GROUP 4
      Deleted Oracle managed file /opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/o1_mf_4_77jcr8bz_.log
      ALTER DATABASE DROP LOGFILE GROUP 5
      Deleted Oracle managed file /opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/o1_mf_5_77jcrd9w_.log
      ALTER DATABASE DROP LOGFILE GROUP 6
      Deleted Oracle managed file /opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/o1_mf_6_77jcrjgt_.log

      These are Standby Redo Logs and not Online Redo Logs!

      However, the last Standby Redo Log group on primary site is still available:

      select type, member from v$logfile where type = 'STANDBY' (primary site):
      GROUP# TYPE MEMBER
      ---------------------------------------------------------------------------------------------------------------------------------------------
      7 STANDBY /opt/oracle/oradata/SELLPROD/archfiles/flashback/DB/onlinelog/o1_mf_7_77jcrmm7_.log

      select group#, type, member from v$logfile where type = 'STANDBY' (standby site):
      GROUP# TYPE MEMBER
      ---------------------------------------------------------------------------------------------------------------------------------------------
      4 STANDBY /opt/oracle/oradata/DB/otherfiles/redo_a/stbyDB_srl0.f
      5 STANDBY /opt/oracle/oradata/DB/otherfiles/redo_a/stbyDB_srl1.f
      6 STANDBY /opt/oracle/oradata/DB/otherfiles/redo_a/stbyDB_srl2.f
      7 STANDBY /opt/oracle/oradata/DB/otherfiles/redo_a/stbyDB_srl3.f

      The DataGuard environment is set up in maximum performance - therefore no errors currently occur.
      The standby redo logs on primary site are created with OMF naming conventions.

      The question now is:
      - would it be correct just to create 3 new standby redo log groups (group# 4, 5 and 6) on the primary site or would that cause
      some problems?
      I would use the statement ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE xxM. Would that create fa OMF file?

      Thanks for any help
      Rgds
      JH
        • 1. Re: accidently deleted standby logfiles on primary site
          Shivananda Rao
          The question now is:
          - would it be correct just to create 3 new standby redo log groups (group# 4, 5 and 6) on the primary site or would that cause
          some problems?
          Standby Redo Logs would not be used on primary database until you perform a switchover operation. So, I would say, you can create the 3 standby redo log groups on the primary database.
          I would use the statement ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE xxM. Would that create fa OMF file?
          The files are on OMF. So your above mentioned command would perfectly work out.
          • 2. Re: accidently deleted standby logfiles on primary site
            mseberg
            Hello;

            Just recreate them. This resize note should help :

            http://jhdba.wordpress.com/2011/02/28/scripts-to-resize-standby-redolog-files/
            ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/u01/app/oracle/oradata//redo04.log' SIZE 200M;
            http://gavinsoorma.com/2009/06/recreate-online-redologs-and-standby-database-logs/

            *Unable To Drop And Recreate Standby Logfiles [ID 395146.1]*

            Best Regards

            mseberg
            • 3. Re: accidently deleted standby logfiles on primary site
              vivalavida
              Hi ,

              since I haven't created the environment I wonder in which directory the standby redo log file would get created when issuing the command

              ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE xxM;

              Is there any chance to figure out which directory would get used? The file should end up in

              /opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/

              and the name of the file can get generated by Oracle's OMF...

              Rgds
              JH
              • 4. Re: accidently deleted standby logfiles on primary site
                mseberg
                What advantage does OMF give you? I don't see a word on this in the Data Guard documentation.

                Just create them :
                ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/redo04.log' SIZE 200M;
                
                ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 '/opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/redo05.log' SIZE 200M;
                
                ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 '/opt/oracle/oradata/DB/archfiles/flashback/DB/onlinelog/redo06.log' SIZE 200M;
                Best Regards

                mseberg
                • 5. Re: accidently deleted standby logfiles on primary site
                  vivalavida
                  Hi ,
                  somebody else has set up the database - and the names of the standby redo logs are generated by OMF. I just wanted to keep this and don't change anything (I myself would not user OMF for those files).

                  I've created the files as you suggested - and everything is fine...

                  Many thanks
                  JH
                  • 6. Re: accidently deleted standby logfiles on primary site
                    user13328398
                    Hi guys,

                    It is not needed to set DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT for environment with different file structure and OMF enabled - benefit of using OMF.

                    Best Regards,