Sunday 8 January 2017

Redo Log Inactive ORA-00313 ORA-00312 ORA-27037

Hi DBA-Mates,
Today, we will discuss some scenario which we have faced and discussed recently in our real time experiences, i.e. related to Inactive online redo log group.
Suppose some of reason, we lost our Inactive online redo log group, then what to do?
Either you or your DBA by mistake dropped that and then he called you that by mistake he has dropped one of the Online redo log group which was inactive, then what will be your next action? What should you do?
Before starting that, I would like to describe about online redo log. This may be helpful for those who is not clear about this. I will try my best to describes in a very simple words.

It records all the changes made in an Oracle database. Here all the changes means, when ever a DBA(you) or any users run any commands like Insert, Delete, Update (DML), DDL etc,or any other commands, these all changes will be record in Online Redo log.
It presents for every Oracle database. The online redo log of a database consists of at least two redo log files that are separate from the datafiles (which actually store a database’s data). As part of recovery from an instance or media failure, Oracle applies the appropriate changes in the database’s redo log to the datafiles, which update database data to the instant that the failure occurred.

Now, we will see the scenario and action.

Please find the below details step by step: 

Now we will SIMULATE THE CORRUPTION
SQL> select Group#,status from v$log;

    GROUP# STATUS
---------- ----------------
         4 INACTIVE
         5 CURRENT

*Here, In above step we can see Group# 4 is INACTIVE status.

SQL> column member format a40
SQL> select GROUP#,member,status  from v$logfile;
    GROUP# MEMBER                                   STATUS
---------- ---------------------------------------- -------
         4 /u01/oracle/oradata/SKU/redo04.log      STALE
         4 /u01/oracle/oradata/SKU/redo04a.log     STALE
         5 /u01/oracle/oradata/SKU/redo05.log
         5 /u01/oracle/oradata/SKU/redo05a.log

* Now,we will create the scenario by removing Inactive Online redolog files as   below:

* This below command can be done from $ prompt also. 
SQL> !rm redo04.log redo04a.log

* Now, shutdown the database. 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

* Startup the database.

SQL> startup
ORACLE instance started.

Total System Global Area 1090519040 bytes
Fixed Size                  2020128 bytes
Variable Size             301993184 bytes
Database Buffers          771751936 bytes
Redo Buffers               14753792 bytes
Database mounted.
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/SKU/redo04.log' 

* As we can see in above output, we are getting some ora alerts.
Now, I will show you people the alert.log details:

In ALERT.log below lines observed:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/SKU/redo04a.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/SKU/redo04.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory

RECOVER FROM CORRUPTION:
SQL> select name,open_mode,log_mode,flashback_on from v$database;

NAME      OPEN_MODE  LOG_MODE     FLASHBACK_ON
---------          ----------            ------------          ------------------
SKU       MOUNTED         ARCHIVELOG   NO

Check the v$log file to check if the file has been archived
SQL> select  GROUP#,STATUS,ARCHIVED from v$log;

    GROUP# STATUS           ARC
---------- ---------------- ---
         5 CURRENT          NO
         4 INACTIVE         YES

Now, we will get many solutions in google for below error which will not work and we will get again some ora errors.
As we can check below:
NOTE:  Both below solutions will not work

SQL> ALTER DATABASE ADD LOGFILE MEMBER '/u01/oracle/oradata/SKU/redo04.log','/u01/oracle/oradata/SKU/redo04a.log' to Group 4;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/oracle/oradata/SKU/redo04.log','/u01/oracle/oradata/SKU/redo04a.log' to Group 4

*
ERROR at line 1:
ORA-01577: cannot add log file '/u01/oracle/oradata/SKU/redo04.log' - file
already part of database


SQL> ALTER DATABASE ADD LOGFILE MEMBER '/u01/oracle/oradata/SKU/redo04b.log','/u01/oracle/oradata/SKU/redo04c.log' to Group 4;
ALTER DATABASE ADD LOGFILE MEMBER '/u01/oracle/oradata/SKU/redo04b.log','/u01/oracle/oradata/SKU/redo04c.log' to Group 4

*
ERROR at line 1:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/SKU/redo04a.log'
ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/SKU/redo04.log'
ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


* Now as per our real time experiences, we tried this below solution.
Actual SolutionAdd a new Group and drop Group 4

SQL>  ALTER DATABASE ADD LOGFILE GROUP 6
  2  '/u01/oracle/oradata/SKU/redo06.log' size 4m;
Database altered.

SQL> ALTER DATABASE ADD LOGFILE MEMBER '/u01/oracle/oradata/SKU/redo06a.log' TO GROUP 6;
Database altered.

SQL> ALTER DATABASE DROP LOGFILE GROUP 4;
Database altered.

SQL> alter database open;
Database altered.
SQL>


Some more useful links:
ORA-609 Solution
CRONTAB Concepts and Details
R12.1 Vs R12.2
Dataguard Concepts and Setup
Career Planning
Hope this will be useful and helpful. If you guys have any comments and suggestions, please write to us and let us know @ Contact Us. Its good to talk you.

61 comments:

  1. Have you ever thought about publishing an e-book or guest authoring on other
    sites? I have a blog based upon on the same ideas you discuss and would really like to
    have you share some stories/information. I know
    my viewers would appreciate your work.If you're even remotely
    interested, feel free too shoot me an e-mail.

    ReplyDelete
  2. It's enormous that you are gettinmg thoughts from this paragraph as well as from our discussion made at this time.

    ReplyDelete
    Replies

    1. Dear User,

      Thank you all guys for your comments and helping the other people.

      Regards,
      ora-data Team.

      Delete
  3. Everyone loves it when individuals get together and share ideas.
    Great site, continue the good work!

    ReplyDelete
    Replies

    1. Dear User,

      Thank you a lots for your feedback.

      Regards,
      ora-data Team

      Delete
  4. Great post. I was checking continuously this blog and I am inspired!
    Extremely helpful information specifically the closing part :
    ) I deal with such information a lot. I used to bee seeking this certain info for a very
    lengthy time. Thanks and best of luck.

    ReplyDelete
    Replies

    1. Dear User,

      Thank you for your feedback.

      Regards,
      ora-data Team

      Delete
  5. It's amazing to pay a visit this web site and reading the views of all mates regarding this paragraph, while
    I am also eager of getting experience.

    ReplyDelete
    Replies

    1. Dear User,

      Thank you visiting here and your comments.

      Regards,
      ora-data Team

      Delete
  6. Thanks for finally talking about >"Redo Log Inactive ORA-00313 ORA-00312 ORA-27037" <Loved it!

    ReplyDelete
    Replies

    1. Dear User,

      Thank you for your comments.

      Regards,
      ora-data Team

      Delete
  7. I'm extremely pleased to discover this website. I wanted to thank
    you for ones time just for this fantastic read!! I definitely savored every bit of it and I have you book-marked to check out new things in your site.

    ReplyDelete
  8. Hi there, for all time i used to check website posts here early in the morning, for the reason that i enjoy to
    learn more and more.

    ReplyDelete
  9. I'm extremely pleased to find this page. I need to to thank
    you for ones time due to this wonderful read!!
    I definitely really liked every bit of it and I have you saved as a favorite to see
    new information in your site.

    ReplyDelete
  10. Hello, I enjoy reading all of your article.
    I like to write a little comment to support you.

    ReplyDelete
  11. Amazing blog! Is your theme custom made or did you download it
    from somewhere? A design like yours with a few simple
    tweeks would really make my blog stand out.
    Please let me know where you got your design. Kudos

    ReplyDelete
    Replies

    1. Dear User,

      It is from blog template and need to be a little bit modification.

      Regards,
      ora-data Team

      Delete
  12. I have been exploring for a little for any high-quality articles or blog
    posts on this kind of house . Exploring in Yahoo I ultimately stumbled upon this web site.
    Reading this info So i'm happy to exhibit that I've a very excellent uncanny feeling I
    found out exactly what I needed. I such a lot for sure will make
    sure to do not overlook this web site and provides it
    a glance on a relentless basis.

    ReplyDelete
  13. Do you have any video of that? I'd want to find out some additional information.

    ReplyDelete
    Replies

    1. Dear User,

      Yes, we have but very few videos, We got struck in work but we will again start it.
      https://www.youtube.com/watch?v=xhRXrBI-DHs&t=22s

      ORACLE SUPPORT (Channel)
      you can get some useful videos.

      Regards,
      ora-data Team

      Delete

  14. Dear Anonymous,

    You have commented as Guest then you should not get/receive notification, if still you are getting then let me know your id , so that I can help you.

    Regards,
    ora-data Team

    ReplyDelete

  15. Dear User,

    Thank you for your feedback and appreciation.
    You can follow us on Facebook also.

    Regards,
    ora-data Team

    ReplyDelete

  16. Dear User,

    hhhehehe this is really funny and interesting. Hope she fine now...
    btw I like it and thanks for sharing your feelings...

    Regards,

    ReplyDelete
  17. I simply couldn't go away your web site prior to suggesting
    that I extremely enjoyed the standard information an individual provide to your
    visitors? Is gonna be again frequently in order to check
    out new posts

    ReplyDelete
    Replies

    1. Dear User,

      Sure, we have new post, please check and also we will keep post as much as possible.
      Sorry for delay in post because busy with some works...

      Regards,
      ora-data Team

      Delete
  18. Heya i'm for the first time here. I found this board and I find
    It truly helpful & it helped me out much. I hope to present something again and aid others such as you aided me.

    ReplyDelete
  19. Fastidious answers in return of this question with genuine arguments and
    explaining the whole thing about that.

    ReplyDelete
  20. I really like what you guys are up too. This kind of clever work and coverage!
    Keep up the awesome works guys I've added you guys to
    my blogroll.

    ReplyDelete
    Replies

    1. Dear Users,

      Thank you every body for their valuable feedback and comments.

      Regards,
      ora-data Team

      Delete
  21. Wow! Finally I got a web site from where I be capable of truly obtain helpful facts concerning my
    study and knowledge.

    ReplyDelete
    Replies

    1. Dear User,

      Thank you for your feedback...

      Regards,
      ora-data Team

      Delete
  22. Hurrah, that's what I was searching for, what a material!
    present here at this website, thanks admin of this site.

    ReplyDelete
    Replies

    1. Dear user,

      Thank you for your valuable feedback and time.

      Regards,
      ora-data Team

      Delete
  23. I do not even know how I ended up here, but I thought this post was good.
    I do not know who you are but certainly you're going
    to a famous blogger if you aren't already ;) Cheers!

    ReplyDelete
    Replies

    1. Dear User,

      Thank you very much for your words.

      Regards,
      ora-data Team

      Delete
  24. I truly love your blog.. Great colors & theme. Did you make this web site yourself?
    Please reply back as I'm hoping to create my very own blog and want
    to learn where you got this from or just what the theme
    is called. Kudos!

    ReplyDelete
  25. Hurrah, that's what I was looking for, what
    a stuff! existing here at this weblog, thanks admin of this web page.

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your feedback.

      Regards,
      ora-data Team

      Delete

  26. Dear User,

    As you can see, I am using google blogspot.

    Regards,
    ora-data Team

    ReplyDelete

  27. Dear User,

    Sure, Thank you.

    Regards,
    ora-data Team

    ReplyDelete

  28. Dear User,

    Thank you very much for your valuable feedback.
    We will always keep best quality even though we post less number of post.

    Regards,
    ora-data Team

    ReplyDelete
  29. Dear User,
    Thank you for your kind feedback.

    Regards,
    ora-data Team

    ReplyDelete
  30. Dear User,
    Thank you very much for your feedback.

    Regards,
    ora-data Team

    ReplyDelete
  31. Hello to every body, it's my first pay a quick visit of this blog; this blog consists of awesome and actually good material designed for visitors.

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your valuable feedback.

      Regards,
      ora-data Team

      Delete
  32. 5) Embrace Keywords in Your Area Identify.

    ReplyDelete
  33. Thank you for sharing with us, I conceive this website genuinely stands out :D.

    ReplyDelete
  34. Somebody essentially help to make seriously articles I would state.
    That is the very first time I frequented your web page and so far?
    I surprised with the research you made to create this particular put up
    amazing. Excellent job!

    ReplyDelete
  35. Hello, all the time i used to check website posts
    here in the early hours in the break of day, for the reason that i love to gain knowledge
    of more and more.

    ReplyDelete
  36. Quality content is the main to be a focus for the people to visit the web page,
    that's what this web page is providing.

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your kind feedback.

      Regards,
      ora-data Team

      Delete
  37. Howdy! I know this is kinda off topic nevertheless I'd
    figured I'd ask. Would you be interested in trading links or maybe guest authoring a blog
    post or vice-versa? My blog covers a lot of the same
    subjects as yours and I believe we could greatly benefit from
    each other. If you're interested feel free to send me an e-mail.
    I look forward to hearing from you! Superb blog by the way!

    ReplyDelete
  38. Great article. I'm experiencing some of these issues as well..

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your feedback.Hope this may useful...

      Regards,
      ora-data Team

      Delete
  39. Its such as you learn my mind! You appear to grasp
    so much about this, such as you wrote the e book in it or something.
    I think that you could do with a few % to drive the message home a little bit, however other than that, this is great blog.
    An excellent read. I will definitely be back.

    ReplyDelete
  40. It is not my first time to pay a quick viswit thiss website, i am visiting this web site dailly and obtain pleasant information from here daily.

    ReplyDelete
  41. As the admin of this website is working, no hesitation very
    quickly it will be renowned, due to its feature contents.

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your kind feedback... :)

      Regards,
      ora-data Team

      Delete
  42. Its likee you read my mind! Youu appear to know a lot about this, like you wrote the boook in it or
    something. I think that you can do with some pics to driv the message home a bit, but instead of that, this
    is fantastic blog. A fantastic read. I will certainly bee back.

    ReplyDelete
  43. I’m not that much of a internet reader to be honest but your blogs
    really nice, keep it up! I'll go ahead and bookmark your website to come back later on. All the best

    ReplyDelete
  44. Quality articles or reviews is the important to invite the visitors to pay a visit the site, that's what this
    web site is providing.

    My homepage; phim 79 viet nam long tieng

    ReplyDelete

Thank you for your comments and suggestions. It's good to talk you.