Shutting Down Oracle On Windows

What is the difference between shutting down an Oracle database (8i and up) on Windows by logging into the instance and issuing the shutdown command vs stoping the Oracle service (OracleServicedbname)?

I think there's no difference - but you can see many more informations by logging in with sqlplus/svrmgrl and shutting down the DB with the shutdown command.
Using MMC and shutting down the service shows only a status bar.

Depends on the version of Oracle and how the instance is configured in the Windows registry. For 9i (not sure about 8i, don't have an 8i instance anymore), each instance has a key in the registry called ORA_<SID>_SHUTDOWN_TYPE that determines the type of shutdown to initiate when the service is stopped (i = immediate for example). The key ORA_<SID>_SHUTDOWN_TIMEOUT specifies the amount of time to wait (seconds I think but I never got a clear answer on this) before the instance is terminated.

That being said, in my opinion it is always best to shutdown the database manually thru SQL*Plus. That way you know what is going on.

There is a difference.

The service must be running in order to have the database running.
The service can be running without the database running.

It's simple to see: start the service, start the database (if not set to automatic start), then connect as sysdba and do a shutdown. Then go look at the services - the OracleServiceSID still shows started.

Stop the service, and then start a SQL*Plus session. Try to connect or start, and you get Oracle not available error.

You can shut down the database either through the sql prompt or by shutting down the associated oracle service , in both the cases the database will shutdown its same if your purpose is to shutdown the database a service is continuously running program which helps other program to run or execute.

But when you stop the oracle service you close the door for everything associated with the service so if you stop the service you cannot start the database unless and until you start the service again.

If you look at the oracle database from programmers perspective you can feel oracle database is not one program, its number of programs running togerther and the oracle service you can think of as the link between all these programs.

On Windows you have "services" which could be started or stopped. You can have Oracle DB up/down only if the service is started.

You can also enable Oracle DB instance to shutdown and startup with the service shutdown/startup. On *NIX you don't have services and so such restrictions.

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.