Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Restart Database Command

Matheus BoesingJul 1 2016 — edited Jul 28 2016

Sometimes the DBA just want to restart a database to enable a parameter value or change the pfile to spfile, or things like that. For these cases the is actually needed to shutdown database than startup the database. But it could have a ‘restart’ command to automatically make the shutdown/startup with parameters. Thinking like that, it can have ‘levels’ of restart, to avoid all process of checkpoint, flush data to disk, switch log file, and etc OR instance recover (in case of abort) like:

1. Complete Restart (similar to actual shutdown/startup):

SQL> RESTART COMPLETE

Database closed.

Database dismounted.

ORACLE instance shut down.

ORACLE instance started.

Total System Global Area  812529152 bytes

Fixed Size                  2264280 bytes

Variable Size             960781800 bytes

Database Buffers           54654432 bytes

Redo Buffers                3498640 bytes

Database mounted.

Database opened.

2. Quick Restart (kill all sessions and restart PMON, SMON, and others, but not flush data to disk neither refresh SGA structure):

SQL> RESTART QUICK

Database closed.

Sessions Killed.

Background Processes Restarted.

Database opened.

It might be combined to the current syntax used by SHUTDOWN or STARTUP, examples:

SQL> RESTART QUICK ABORT; -- (shutdown with abort)

SQL> RESTART COMPLETE [NO]MOUNT; -- (shutdown and startup database nomounted or mounted state only)

SQL> RESTART QUICK ABORT SPFILE=‘/new/location/pfile’; -- (shutdown abort and start with other SPFILE)

Another advantage is to enable QUICK RESTARTS to activities like enable or disable ARCHIVELOG, FLASHBACK and other things that, I think, not necessary demands a COMPLETE instance restart.

Other databases like MySQL have this kind of implementation and it’s very useful.

Comments

Gerald Venzl-Oracle

How is that different from SHUTDOWN and STARTUP today except that the DBA has to type two commands rather than one?

Both of those commands do already offer several levels of operation.

Starting Up a Database

Shutting Down a Database

One can even Suspend and Resume a Database but that is off topic for this idea.

Sven W.

>>Other databases like MySQL have this kind of implementation and it’s very useful.


Useful in which situations?


I think this would only be used by inexperienced administrator. In the sense of: Hm... something is wrong with my database, I don't know what to do, let's restart it.


But they can even do it now using the windows services panel.


I hope the majority or Oracle DBAs does not fall into this category.


The need to restart a database should be very very rare. In most cases it is requried because some major administrative atsks are neccessary. In that case things are to do between shutdown and startup. Maybe a startup in restricted mode, applying some patch or whatever.

BPeaslandDBA

I'd also have the command know the current state of the database and startup to that level. For example, standby databases are in MOUNT mode and the RESTART should bring back to MOUNT mode.

Franck Pachot

Hi,

Your 'RESTART COMPLETE' is actually possible with 'STARTUP FORCE' if you trust instance recovery...

Your 'RESTART QUICK' is actually possible with 'STARTUP FORCE' in a Pluggable Database as there's no instance to shut down.

Regards,

Franck.

Gbenga Ajakaye

I don't see how this can add value. I prefer what's currently in place.

1 - 5

Post Details

Added on Jul 1 2016
5 comments
10,007 views