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: What is the difference between oradim and startup?

Re: What is the difference between oradim and startup?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 16 Apr 2003 23:06:16 -0700
Message-ID: <92eeeff0.0304162206.2b79f7f6@posting.google.com>


Peter <peter_at_nomorenewsspammin.ca> wrote in message news:<t2lr9v4p2un6d5eu3lkp8ercg3pg2ou3tp_at_4ax.com>...
> What is the difference between
>
> oradim -NEW -SID
>
> and
> (from within sqlplus)
> startup nomount pfile=.....
>
>
> With oradim, you start an Oracle service, but is an Oracle service the
> same as an Oracle instance (with SGA, background processes) ?
>
> Does "startup" start an oracle instance or an oracle service?

Please do not cross post.

  1. oradim with -NEW switch is used to create service for a new SID. You are probably referring to -STARTUP switch. It all depends on the -STARTTYPE switch used in conjunction with -STARTUP as to what you want to do. You can startup service, instance or both.
  2. Startup command from sqlplus/server manager is used to startup an instance. To use this, you already should have OracleServiceSID started up... by e.g. either starting the service or using oradim -STARTUP .... -STARTYPE srvc. Another thing is that if you have the registry AUTOSTART flag for the SID set to TRUE, then starting the service also starts up the instance.

Unlike *nix, Oracle service on a Windows platform only creates an initial Oracle process for the SID while allocating initial resources e.g. memory etc. This Oracle process is required to startup an Oracle instance because Oracle instance is made up of many threads (Depending on what is installed in the database) that are owned by the Oracle process and are initiated when a "startup" command is issued via sqlplus/server manager.

Since Oracle process owns all the threads under it, you can terminate a thread without terminating the process but terminating the process kills all the threads automatically. e.g. by using "shutdown immediate" from sqlplus will terminate all instance threads while the parent Oracle process continues to run... however, stopping the Oracle service effectively terminates the process with all the instance threads.

Oracle process for the SID is created by,

a) Starting the SID service OR
b) Oradim -STARTUP -SID .... -STARTTYPE srvc OR
c) %ORACLE_HOME%\bin\oracle*.exe <SID>. Although you can create an
Oracle process this way but it should normally not be used as it is interactive and process will be killed once the user logs off.

Oracle instance is a combination of threads owned by the Oracle process created as mentioned above. These threads (instance) can be initialized once the process is created by, a) Sqlplus/server manager startup command OR b) Oradim -STARTUP -SID .... -STARTTYPE inst.

To view all this, Open Windows Task Manager --> Processes. Startup Oracle service and keep an eye on Threads column. You will see Oracle process gets created with some memory allocation and few threads are initiated. Open sqlplus/server manager and startup Oracle instance. You will see the thread count jump to somewhere between 14 and 30 threads. More memory is also allocated as SGA is initialized. View same results while using shutdown command.

HTH
Regards
/Rauf Sarwar Received on Thu Apr 17 2003 - 01:06:16 CDT

Original text of this message

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