Home » RDBMS Server » Server Administration » Writting control file
Writting control file [message #532839] Fri, 25 November 2011 02:52 Go to next message
emergingdba
Messages: 13
Registered: April 2011
Location: bangalore
Junior Member

Hi,

I was doing some R&D on my test machine trying to understand how controlfile works. I started up my db and then deleted (renamed)the controlfiles at OS level. I was expecting the db to shutdown. But it dint. Moreover when i queried select name from v$controlfile; it was still reflecting the old controlfile names. To check if it was still functioning, i created a new tablespace with one file and it also got created without any error.

What i dint understand is how could the db still be running when the control file was'nt there and new tablespace and datafile get created? As i understand, whenever a new file is created, an entry is made in the control file. But when control file dint exist where was the data about new tablespace and datafile written?
Re: Writting control file [message #532841 is a reply to message #532839] Fri, 25 November 2011 02:59 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
Are you using Unix of some kind? If so, when you rm a file, all you do is remove te directory entry, not the file. So if te file is already open, it can still be used. Do a shutdown to close all the file handles, and then you will be in trouble when you startup.
Re: Writting control file [message #532844 is a reply to message #532841] Fri, 25 November 2011 03:15 Go to previous messageGo to next message
emergingdba
Messages: 13
Registered: April 2011
Location: bangalore
Junior Member

Hi John,

Oracle is running on linux. My doubt is that when i had renamed the control file, the file did not exist. So what was the database using when controlfile did not physically exist.

And i did have troubles when i tried to start it later after shutting it down.
Re: Writting control file [message #532852 is a reply to message #532844] Fri, 25 November 2011 03:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
the file did not exist

The file still exists, then entry in the directory no more exists but Oracle directly points to the file so until it shuts down there is no problem.
If you shut down the instance, then you have to rename the control file in the spfile or init.ora before restarting it.

Regards
Michel
icon7.gif  Re: Writting control file [message #532980 is a reply to message #532839] Fri, 25 November 2011 19:50 Go to previous messageGo to next message
emergingdba
Messages: 13
Registered: April 2011
Location: bangalore
Junior Member

Thanks Michel and John.
Re: Writting control file [message #533076 is a reply to message #532980] Mon, 28 November 2011 02:17 Go to previous message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Oh great r & d!
Thank you Gurus for knowledge sharing. Smile

regards,
Delna
Previous Topic: ORA-04à30 (split from Table space with different block size inside same database)
Next Topic: Oracle optimizer view
Goto Forum:
  


Current Time: Thu Apr 18 18:59:46 CDT 2024