Starting & Stopping the Oracle Service (Windows)

Home

Toolkit:

My OraFAQ Blog

Contact me

Most services on Windows NT/2000 Server can be started and stopped either via the Services control panel or by issuing the DOS command "net [start|stop] servicename". This is NOT the case for the Oracle service.

Using "net start/stop" with the Oracle service is a bad habit to get into. Depending upon your registry parameters, stopping and starting the service may not actually bounce the database. It can bounce the service only; the database only; or both the service and the database.

Oracle recommends that you use their Oracle-supplied utility, oradim.exe, to start & stop the service. (OraDim is also used to set up and configure the service & the above-mentioned registry parameters; more about this here.) Unlike net start & net stop, oradim lets you supply the shutdown type (normal, immediate, or abort) and shutdown mode (instance, service, or both.


C:\ORACLE\ORA81>ORADIM -SHUTDOWN -SID  -USRPWD  - SHUTTYPE  -SHUTMODE  

NB: oradim.exe has different names depending on the version of Oracle. For example, ORADIM72.EXE.


Note: Proofread any scripts before using. Always try scripts on a test instance first. I'm not responsible for any damage, even if you somehow manage to make my scripts corrupt every last byte of your data, set your server on fire and serve you personally with an eviction notice from your landlord!
All scripts and tips © Natalka Roshak 2001-2005.
Enjoy the FREE tips folks...