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.

20 comments:

Anonymous said...

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!

Anonymous said...

Adding the second file is not working for me.

Unknown said...

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

Anonymous said...

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

Anonymous said...

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

Anonymous said...

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

oakleyses said...

oakley sunglasses, prada handbags, oakley sunglasses, longchamp handbags, longchamp handbags, louboutin shoes, louis vuitton handbags, coach factory outlet, tiffany and co, coach purses, louis vuitton outlet, polo ralph lauren outlet, air max, prada outlet, longchamp outlet, oakley sunglasses cheap, ray ban sunglasses, louboutin outlet, michael kors outlet, michael kors outlet, tiffany and co, burberry outlet, christian louboutin shoes, coach outlet store online, jordan shoes, polo ralph lauren outlet, louboutin, kate spade handbags, michael kors outlet, coach outlet, air max, gucci outlet, michael kors outlet, ray ban sunglasses, chanel handbags, michael kors outlet, tory burch outlet, nike free, kate spade outlet, louis vuitton outlet, burberry outlet, louis vuitton outlet stores, louis vuitton, nike shoes, michael kors outlet

oakleyses said...

oakley sunglasses, prada handbags, oakley sunglasses, longchamp handbags, longchamp handbags, louboutin shoes, louis vuitton handbags, coach factory outlet, tiffany and co, coach purses, louis vuitton outlet, polo ralph lauren outlet, air max, prada outlet, longchamp outlet, oakley sunglasses cheap, ray ban sunglasses, louboutin outlet, michael kors outlet, michael kors outlet, tiffany and co, burberry outlet, christian louboutin shoes, coach outlet store online, jordan shoes, polo ralph lauren outlet, louboutin, kate spade handbags, michael kors outlet, coach outlet, air max, gucci outlet, michael kors outlet, ray ban sunglasses, chanel handbags, michael kors outlet, tory burch outlet, nike free, kate spade outlet, louis vuitton outlet, burberry outlet, louis vuitton outlet stores, louis vuitton, nike shoes, michael kors outlet

oakleyses said...

converse, air max, gucci, canada goose, juicy couture outlet, canada goose, wedding dresses, moncler, ralph lauren, lancel, montre homme, moncler, louboutin, oakley, karen millen, vans, coach outlet store online, air max, canada goose jackets, ugg, hollister clothing store, louis vuitton, baseball bats, hollister, rolex watches, juicy couture outlet, iphone 6 cases, canada goose uk, canada goose outlet, ugg, moncler, moncler outlet, timberland boots, hollister, supra shoes, moncler, canada goose, converse shoes, toms shoes, moncler, moncler, canada goose, ugg boots, ray ban, parajumpers, canada goose

oakleyses said...

converse, air max, gucci, canada goose, juicy couture outlet, canada goose, wedding dresses, moncler, ralph lauren, lancel, montre homme, moncler, louboutin, oakley, karen millen, vans, coach outlet store online, air max, canada goose jackets, ugg, hollister clothing store, louis vuitton, baseball bats, hollister, rolex watches, juicy couture outlet, iphone 6 cases, canada goose uk, canada goose outlet, ugg, moncler, moncler outlet, timberland boots, hollister, supra shoes, moncler, canada goose, converse shoes, toms shoes, moncler, moncler, canada goose, ugg boots, ray ban, parajumpers, canada goose

Unknown said...

thanks .

Unknown said...

Thanks for this post. Really helped.

yanmaneee said...

cheap jordans
kobe 11
michael kors bags
longchamp
christian louboutin outlet
kd shoes
christian louboutin outlet
louboutin
coach outlet
golden goose sneakers

Training for IT and Software Courses said...

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

Training for IT and Software Courses said...

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

nisharoshan said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.


Web Designing Training Course in Chennai | Certification | Online Training Course | Web Designing Training Course in Bangalore | Certification | Online Training Course | Web Designing Training Course in Hyderabad | Certification | Online Training Course | Web Designing Training Course in Coimbatore | Certification | Online Training Course | Web Designing Training Course in Online | Certification | Online Training Course



Shambhu said...

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.

Shambhu said...

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.

Keerthi55 said...

Thanks for the blog article.Much thanks again. Fantastic.
salesforce training
salesforce online training

Linda Tony said...

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