Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Win2K- How to start DB? thru Services or Sql*Plus?

Re: Win2K- How to start DB? thru Services or Sql*Plus?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 11 Aug 2002 14:16:37 -0700
Message-ID: <92eeeff0.0208111316.6dbeef8f@posting.google.com>


"Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in message news:<3d55b558_at_dnews.tpgi.com.au>...
> The way I always explain your specific question is this: the service is not
> the Instance, but it's the (Windows)architectural underpinning of the
> Instance. That's why killing the service kills the Instance, but not the
> other way around.
>
> But we're delving into the realms of Windows programming here, so I'll bow
> out and let someone more qualified continue as they see fit!
>
> Regards
> HJR
>

Simply put, Windows service is a mechanism to create/launch a process in the background without any user interaction and the process will keep running even when the user logs off. On the other hand, if the process is created from cmd.exe, double clicking a Win32 application or from START -> Run...it will have to shut down once the user logs off. Almost all services have an "ImagePath" entry in the registry which points to a .exe, .sys etc files. Service will create and control the "ImagePath" (Process) it is associated with. Oracle database service's "ImagePath" is ORACLE_HOME\bin\oracle with DB_SID as the parameter. In Oracle's case, there is only one process "oracle.exe" with multiple threads.

To test this, launch task manager. Include "Thread Count" column from View -> Select columns. Now start Oracle service and watch for "oracle.exe" process. Assuming the database is not starting when you launch the service, thread count for oracle.exe process will be somewhere between 2 and 5. Now start the database from svrmgrl/sqlplus and watch the thread count go up as the database is mounted and then opened.

So the long winded answer is that when a database is shutdown/startup from svrmgrl or sqlplus, *only* the associated threads under the oracle process are terminated/created and memory that is associated with those threads is released/allocated. Oracle service is only responsible for Creating and terminating the "oracle.exe" process. Oracle process on the other hand is responsible for creating or terminating additional threads that start or shutdown a database.

Services are controlled by SCM (Services Control Manager) database. For more info on this, read docs on windows service functions in Windows API Advapi32.dll.

HTH
//Rauf Sarwar Received on Sun Aug 11 2002 - 16:16:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US