Home » Server Options » RAC & Failsafe » Drop database in mount state (Oracle 10g,11g , Linux 6)
Drop database in mount state [message #618312] Thu, 10 July 2014 10:25 Go to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi ,

When we drop a database using following steps in sqlplus tool, why do we drop it in mount state and not in open or nomount state.
Can you please explain ?
connect SYS/<syspwd> as SYSDBA
alter system set cluster_database=false scope=spfile;
shutdown immediate
startup mount restrict
drop database;
exit;

Regards,
Srini

[Updated on: Thu, 10 July 2014 10:27]

Report message to a moderator

Re: Drop database in mount state [message #618313 is a reply to message #618312] Thu, 10 July 2014 10:31 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You couldn't drop it in nomount mode, because in nomount you haven't connected to the database. You don't even know where it is. So the command would have to mount the database first.
Similarly, you couldn't drop it in open mode because, well, everything is open. So the command would have to close the database first.

Seems reasonable to me.
Re: Drop database in mount state [message #618314 is a reply to message #618313] Thu, 10 July 2014 10:42 Go to previous messageGo to next message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Hi John,

Firstly ,i thank you for your quick response.I am not surprise to see your quick answer Smile because i know this is how orafaq moderators provide answers to us.

Quote:
Similarly, you couldn't drop it in open mode because, well, everything is open

Well it would be good,if you could explain why we cannot drop a database when it is in open state ?
What would be the impact if we try to drop a database when it is in open state ?

Regards,
Srini

[Updated on: Thu, 10 July 2014 10:45]

Report message to a moderator

Re: Drop database in mount state [message #618315 is a reply to message #618314] Thu, 10 July 2014 11:29 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>What would be the impact if we try to drop a database when it is in open state ?
It would similar to trying to pack your parachute after you have already jumped out of the plane.
Re: Drop database in mount state [message #618316 is a reply to message #618314] Thu, 10 July 2014 11:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Because when you are in open mode then multiple processes write into the different files (data, redo, control...) and you can't delete a file that is currently written.

If you want an analogy, if you want to "drop" a building you have to:
1/ Know where it is and go to (this is what mount does)
2/ Say everyone to leave the building and close it, to lead to safe destruction.

Re: Drop database in mount state [message #618317 is a reply to message #618314] Thu, 10 July 2014 11:37 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
John elaborated the prerequisites already.

I am just poiniting you to documentation with specific quote :

Quote:

You must be connected to a target database. The target database must be mounted exclusive and not open, and started in RESTRICT mode.


Link is here http://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta019.htm
Re: Drop database in mount state [message #618318 is a reply to message #618317] Thu, 10 July 2014 11:41 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Michel, sorry, by the time I prepared my post with the link to docs for more clarification, you already posted with further explanation Smile
Re: Drop database in mount state [message #618320 is a reply to message #618318] Thu, 10 July 2014 11:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Link to documentation are always welcome.

Re: Drop database in mount state [message #618334 is a reply to message #618320] Thu, 10 July 2014 23:45 Go to previous message
Database admin
Messages: 365
Registered: September 2006
Location: india
Senior Member

Thank you all for your clarification on drop database.

I wish you all a great future in your life !

[Updated on: Thu, 10 July 2014 23:45]

Report message to a moderator

Previous Topic: Server identification
Next Topic: Standalone Database
Goto Forum:
  


Current Time: Thu Mar 28 05:42:50 CDT 2024