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.

17 comments:

Matt Keehan 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.

Avishek Mallik 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...

air max, hollister, true religion outlet, nike blazer, louboutin, ray ban sunglasses, polo ralph lauren, michael kors, true religion jeans, sac guess, sac longchamp, hogan outlet, ralph lauren, vans pas cher, sac louis vuitton, air max pas cher, nike free pas cher, nike free, air max, mulberry, nike roshe run, sac burberry, hollister, vanessa bruno, louis vuitton, lululemon, michael kors pas cher, oakley pas cher, air jordan, ray ban pas cher, new balance pas cher, polo lacoste, converse pas cher, north face, sac louis vuitton, michael kors, sac hermes, nike tn, timberland, louis vuitton uk, longchamp, true religion jeans, nike air max, air force, north face

oakleyses said...

air max, hollister, true religion outlet, nike blazer, louboutin, ray ban sunglasses, polo ralph lauren, michael kors, true religion jeans, sac guess, sac longchamp, hogan outlet, ralph lauren, vans pas cher, sac louis vuitton, air max pas cher, nike free pas cher, nike free, air max, mulberry, nike roshe run, sac burberry, hollister, vanessa bruno, louis vuitton, lululemon, michael kors pas cher, oakley pas cher, air jordan, ray ban pas cher, new balance pas cher, polo lacoste, converse pas cher, north face, sac louis vuitton, michael kors, sac hermes, nike tn, timberland, louis vuitton uk, longchamp, true religion jeans, nike air max, air force, north face

oakleyses said...

air max, hollister, true religion outlet, nike blazer, louboutin, ray ban sunglasses, polo ralph lauren, michael kors, true religion jeans, sac guess, sac longchamp, hogan outlet, ralph lauren, vans pas cher, sac louis vuitton, air max pas cher, nike free pas cher, nike free, air max, mulberry, nike roshe run, sac burberry, hollister, vanessa bruno, louis vuitton, lululemon, michael kors pas cher, oakley pas cher, air jordan, ray ban pas cher, new balance pas cher, polo lacoste, converse pas cher, north face, sac louis vuitton, michael kors, sac hermes, nike tn, timberland, louis vuitton uk, longchamp, true religion jeans, nike air max, air force, north face

oakleyses said...

abercrombie and fitch, instyler, ghd, bottega veneta, ugg boots, jimmy choo outlet, soccer shoes, ugg pas cher, herve leger, beats by dre, birkin bag, abercrombie and fitch, north face jackets, soccer jerseys, mont blanc, rolex watches, lululemon outlet, celine handbags, nike roshe run, nike trainers, giuseppe zanotti, hollister, wedding dresses, nike huarache, mcm handbags, vans shoes, chi flat iron, babyliss pro, north face outlet, nike roshe, ugg australia, ugg, marc jacobs, barbour, nfl jerseys, p90x, new balance shoes, asics running shoes, ferragamo shoes, mac cosmetics, insanity workout, uggs outlet, reebok outlet, longchamp, valentino shoes

oakleyses said...

abercrombie and fitch, instyler, ghd, bottega veneta, ugg boots, jimmy choo outlet, soccer shoes, ugg pas cher, herve leger, beats by dre, birkin bag, abercrombie and fitch, north face jackets, soccer jerseys, mont blanc, rolex watches, lululemon outlet, celine handbags, nike roshe run, nike trainers, giuseppe zanotti, hollister, wedding dresses, nike huarache, mcm handbags, vans shoes, chi flat iron, babyliss pro, north face outlet, nike roshe, ugg australia, ugg, marc jacobs, barbour, nfl jerseys, p90x, new balance shoes, asics running shoes, ferragamo shoes, mac cosmetics, insanity workout, uggs outlet, reebok outlet, longchamp, valentino shoes

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

suresh nalla said...

thanks .

Reginald Perrin said...

Thanks for this post. Really helped.