Skip to Content

Database is not Opening. Errors are coming due to Copy Mismatch of Log file

Hello Friends,

I did some mistakes and deleted all log files after closing SAP QAS System.

I was trying to Resizing the Redo Log files, as per as SNOTE 309526.

All control files are consistent. Only due to Log File mismatch, Database is not Opening.

Here, is the error.

*

ERROR at line 1:

ORA-00322: log 14 of thread 1 is not current copy

ORA-00312: online log 14 thread 1: '/oracle/RQ1/mirrlogB/log_g14m2.dbf'

ORA-00322: log 14 of thread 1 is not current copy

ORA-00312: online log 14 thread 1: '/oracle/RQ1/origlogB/log_g14m1.dbf'

In working condition, Previously the file was with this name log_g11m1.dbf......

I had replaced all the files, which i had backedup ,before deleting those Log files. But, still this kind of error is coming.

I tried to "reset log", but it failed.

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01139: RESETLOGS option only valid after an incomplete database recovery

I did all the activities after Closing SAP System.

I want your Quick help, as its critical for me.

Regards

Bhavik Shroff

Edited by: Bhavik G. Shroff on Nov 8, 2008 3:49 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 08, 2008 at 03:28 PM

    Hello Bhavik,

    > I did some mistakes and deleted all log files after closing SAP QAS System.

    If you have no member of the current or active online logroup you are really in trouble, but if you have a consistent offline backup of everything (datafiles and controlfiles) or your database was shutdown cleanly at this point, you are a lucky man 😊

    > ERROR at line 1:

    > ORA-01139: RESETLOGS option only valid after an incomplete database recovery

    This error is based on the UNTIL clause in the recovery scenario.

    You can only execute an OPEN RESETLOGS after a recovery with the UNTIL clause.

    I have tested your scenario on a test database with oracle 10.2.0.4

    Just take a look at here:

    SQL> select * from v$log;
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
             1          1         68   52428800          1 NO  CURRENT                3716197 08-NOV-08
             2          1         66   52428800          1 YES INACTIVE               3648097 06-NOV-08
             3          1         67   52428800          1 YES INACTIVE               3689993 07-NOV-08
    
    shell> deleted all members of every online redolog group (the important one in your case is the CURRENT one)
    
    SQL> startup
    ORACLE instance started.
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: '/oracle/TST/oradata/redolog/redo01.log'
    
    
    SQL> alter database open resetlogs;
    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01139: RESETLOGS option only valid after an incomplete database recovery
    
    SQL> recover database until cancel
    Media recovery complete.
    SQL> alter database open resetlogs;
    Database altered.
    
    SQL> select * from v$log;
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
             1          1          1   52428800          1 YES INACTIVE               3735838 08-NOV-08
             2          1          2   52428800          1 NO  CURRENT                3735839 08-NOV-08
             3          1          0   52428800          1 YES UNUSED                       0
    

    Regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Stefan,

      Now, My Database is now recovered. Its running now. Also, SAP QAS System is up and running nice.

      I tried lot of alternatives to resolve that Problem without applying Restore + Recovery Options.

      But, Ultimately I needed to do Database Point-in-Time Recovery with the help of ArchiveLog Sequence Number.

      It succeeded.

      But, I am thinking that Whether this kind of situation requires Database Recovery , due to Online Redo Log files related errors.

      I think the better way to Resize the Online Redo log File will be ...

      1. If possible Take Online Consistent Backup of Database.

      2. Switching Log files which are in use, otherwise u will not be able to drop the Log File Group.

      3. If necessary, Drop the Log File Group, if you want to reuse it.

      or

      3. Create the (New) Group with its associated Redo Log File Members, including Mirrored Members with new Size.

      If you want to delete those Old Files then , Please take the Whole Backup of origlogA, origlogB, mirrlogA, mirrlogB and all control files.

      Thanks a lot Stefan for your cooperations.

      Regards

      Bhavik Shroff

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.