Pages

Wednesday, October 6, 2010

ORA-00214: controlfile inconsistent error after hiberning virtual machine

Today I discovered this error while trying to start a database on my virtual machine. I think it happened because yesterday I "hibernated" several times my machine while this virtual machine and database were still running and forgot to close them.
Anyway.. this is what I've done to bring my database back to a normal and available status.

[oracle@plutone ~]$ SQL
SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 4 11:56:36 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

idle> startup
ORACLE instance started.

Total System Global Area 263049216 bytes
Fixed Size 2212448 bytes
Variable Size 213912992 bytes
Database Buffers 41943040 bytes
Redo Buffers 4980736 bytes
ORA-00214: control file '/DATA/DB11G/control01.ctl' version 1935 inconsistent with file '/u01/app/oracle/flash_recovery_area/DB11G/control02.ctl' version 1932

idle> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
idle> exit


Ok.. the error is quite clear. I need to remove a controlfile. Let me see my configuration and where are located my controlfiles.


[oracle@plutone ~]$ SQL

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 4 12:26:12 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

idle> startup nomount
ORACLE instance started.

Total System Global Area 263049216 bytes
Fixed Size 2212448 bytes
Variable Size 213912992 bytes
Database Buffers 41943040 bytes
Redo Buffers 4980736 bytes
idle> show parameter control_file

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /DATA/DB11G/control01.ctl, /u0
1/app/oracle/flash_recovery_ar
ea/DB11G/control02.ctl



I tried to use only one controlfile and see if my database likes it.

idle> alter system set control_files='/DATA/DB11G/control01.ctl' scope=spfile;

System altered.

idle> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
idle> startup restrict
ORACLE instance started.

Total System Global Area 263049216 bytes
Fixed Size 2212448 bytes
Variable Size 213912992 bytes
Database Buffers 41943040 bytes
Redo Buffers 4980736 bytes
Database mounted.
Database opened.
idle> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.


Ok.. the first controlfile is the good one, so I have to copy it to my second controlfile location

idle> host
[oracle@plutone ~]$ cp /DATA/DB11G/control01.ctl /u01/app/oracle/flash_recovery_area/DB11G/control02.ctl
[oracle@plutone ~]$ exit
exit


Start the instance again in nomount mode and add the second controlfile.


idle> startup nomount
ORACLE instance started.

Total System Global Area 263049216 bytes
Fixed Size 2212448 bytes
Variable Size 218107296 bytes
Database Buffers 37748736 bytes
Redo Buffers 4980736 bytes
idle> show parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /DATA/DB11G/control01.ctl
idle> alter system set control_files='/DATA/DB11G/control01.ctl','/u01/app/oracle/flash_recovery_area/DB11G/control02.ctl' scope=spfile;

System altered.
idle> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.


Now let's start the instance in normal mode

idle> startup
ORACLE instance started.

Total System Global Area 263049216 bytes
Fixed Size 2212448 bytes
Variable Size 218107296 bytes
Database Buffers 37748736 bytes
Redo Buffers 4980736 bytes
Database mounted.
Database opened.
idle> show parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /DATA/DB11G/control01.ctl, /u0
1/app/oracle/flash_recovery_ar
ea/DB11G/control02.ctl


That's all.

21 comments:

  1. Just wanted to say thank you for this post! I know next to nothing about Oracle, and have been trying to figure out what had happened to my VM instance all morning. Your post is really well explained. Cheers!

    ReplyDelete
  2. Adding the second file is not working for me.

    ReplyDelete
  3. Thanks a lot. this steps heps me a lot.
    Thanks friend. Very good documentation.

    ReplyDelete
  4. Hi, I do believe this is an excellent site. I stumbledupon it ;) I am going to return yet again since I book marked it.
    Money and freedom is the greatest way to change, may you be
    rich and continue to help other people.

    Also visit my weblog - bankruptcy florida

    ReplyDelete
  5. Today, I went to the beach front with my children.
    I found a sea shell and gave it to my 4 year old daughter
    and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is entirely off topic but I
    had to tell someone!

    my web site; teenpornpost

    ReplyDelete
  6. Just wanted to say thanks for the post! This article helped me out big time. Thanks again for sharing your solution!

    ReplyDelete
  7. Thanks for this post. Really helped.

    ReplyDelete
  8. I am Here to Get Learn Good Stuff About Hadoop Training, Thanks For Sharing
    Hadoop Training.Hadoop Training in Bangalore

    ReplyDelete
  9. Its really helpful for the users of this site. I am also searching about these type of sites now a days. So your site really helps me for searching the new and great stuff.

    aws training in bangalore

    aws courses in bangalore

    aws classes in bangalore

    aws training institute in bangalore

    aws course syllabus

    best aws training

    aws training centers

    ReplyDelete
  10. Many businesses which are hoping to increase their online presence are hiring an SEO company or using SEO services well to gain every single benefit while achieving their goals. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
    Our Motive is not just to create links but to get them indexed as will
    Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
    High Quality Backlink Building Service
    1000 Backlink at cheapest
    50 Free Backlink
    Although attempting to learn SEO yourself is a good idea as well as a tempting one, there are high chances you might implement SEO techniques wrongly because they need months and years of experience.

    ReplyDelete
  11. Even if you are armed with an abundance of knowledge in SEO, you may still need the services of a professional SEO company. Having strong knowledge of SEO is hardly sufficient in some cases. 2000 Backlink at cheapest
    5000 Backlink at cheapest
    Boost DA upto 15+ at cheapest
    Boost DA upto 25+ at cheapest
    Boost DA upto 35+ at cheapest
    Boost DA upto 45+ at cheapest
    Even if you are doing your best to attempt to obtain a good ranking for your website, you might still wind up wondering why your website is simply not doing well.

    ReplyDelete
  12. I want to let you know that I have found this software to be incredible and it's very easy to useRedshift Render

    ReplyDelete