Home » Infrastructure » Windows » How to disable oracle automatic STARTUP in Windows
icon5.gif  How to disable oracle automatic STARTUP in Windows [message #430699] Wed, 11 November 2009 16:47 Go to next message
dariyoosh
Messages: 538
Registered: March 2009
Location: France
Senior Member
Dear all,

Whenever I want to start oracle server on linux I run the following
(all needed environment variables ORACLE_SID, ORACLE_BASE, ORACLE_HOME are already set)
$ su - oracle
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> Connected to an idle instance
SQL> STARTUP

And after a few seconds the server is up. And for server shutdown I just run SHUTDOWN instead of STARTUP in the same way. This manual startup/shutdown works pretty well.

Recently I installed Oracle Enterprise 11g R1 on Vista for the first time, but it seems that whenever windows boots up, the oracle server also is running automatically as a system process no matter whether I really need it or not at that time.

I have two questions:
- Is there a way to disable this function and obtain a manual control over the startup/shutdown of the oracle server?
- Is the shutdown/STARTUP process in SQL*Plus is done in the same way as it is done in linux
that is, what I wrote above?


Thanks in advance,

Kind Regards,
Dariyoosh
Smile

[Updated on: Wed, 11 November 2009 16:52]

Report message to a moderator

Re: How to disable oracle automatic STARTUP in Windows [message #430703 is a reply to message #430699] Wed, 11 November 2009 17:27 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
The difference between Windows and Linux/Unix in this regard is that every database instance on Windows also has an associated "Service".

the command line tool oradim is used to manage those services.

So it seems right now, on your system:

- The service is set to autostart
- In the oradim configuration it is specified to start the instance once the service starts.

So the easiest way to have the database running only when you need it is to set the Service in the Windows service configuration from "Automatic" to "Manual" ( Control Panel → Administrative Tools → Services ) and only start it when you need the database.

You cam also start/stop the instance itself in the usual way without affecting the service while the service is running, but you can't start the instance unless the service is running.

[Updated on: Wed, 11 November 2009 17:28]

Report message to a moderator

Re: How to disable oracle automatic STARTUP in Windows [message #430728 is a reply to message #430703] Thu, 12 November 2009 01:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
So the easiest way to have the database running only when you need it is to set the Service in the Windows service configuration

And the official way is to use oradim:
ORADIM: <command> [options].  Refer to manual.
Enter one of the following command:
Create an instance by specifying the following options:
     -NEW -SID sid | -SRVC srvc | -ASMSID sid | -ASMSRVC srvc [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-TIMEOUT secs] [-RUNAS osusr/ospass]
Edit an instance by specifying the following options:
     -EDIT -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-SHUTTYPE srvc|inst] [-RUNAS osusr/ospass]
Delete instances by specifying the following options:
     -DELETE -SID sid | -ASMSID sid | -SRVC srvc | -ASMSRVC srvc
Startup services and instance by specifying the following options:
     -STARTUP -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTTYPE srvc|inst|srvc,inst] [-PFILE filename | -SPFILE]
Shutdown service and instance by specifying the following options:
     -SHUTDOWN -SID sid | -ASMSID sid [-SYSPWD pass]
 [-SHUTTYPE srvc|inst|srvc,inst] [-SHUTMODE normal|immediate|abort]
 Query for help by specifying the following parameters: -? | -h | -help

Regards
Michel
Re: How to disable oracle automatic STARTUP in Windows [message #430770 is a reply to message #430699] Thu, 12 November 2009 05:22 Go to previous messageGo to next message
dariyoosh
Messages: 538
Registered: March 2009
Location: France
Senior Member
Dear Thomas and Michel


Thank you very much both of you for your attention to my problem


As Thomas indicated in his post I checked Control Panel → Administrative Tools → Services


I found the following services:

Oracle DB01 VSS Writer Service
OracleDBCConsoleddb01
OracleJobSchedulerDB01
OracleMTSRecoveryService
OracleOraDB11g_home1TNSListener
OracleServicDB01


Which seems to conform to oracle parameters on my system:

ORACLE_SID=db01
The name given to Oracle home during the installation was OracleOraDB11g_home1


I changed the status of the OracleServiceDB01 from automatic to manual. Then
I run the following commands.

oradim -SHUTDOWN -SID db01 -SHUTTYPE SRVC,INST  -SHUTMODE immediate

After running the following I saw that in fact both instance and database
had been shutdown and any attempt to connect with sqlplus would raise
ORA-12560: TNS:protocol adapter error


Then I run the following
oradim -STARTUP -SID db01

And I saw that this command starts up both instance and database.


- Was ServiceDB01 the only service, whose status had to be changed from automatic to manual, or there are other services?

- Is there a way to mount with oradim just the instance but not the database?

- Is it correct to say that having the oradim utility on windows the SQL*Plus commands "STARTUP" and "SHUTDOWN" have no more interest on windows platform?



Thanks in advance,
Dariyoosh
Smile
Re: How to disable oracle automatic STARTUP in Windows [message #430780 is a reply to message #430770] Thu, 12 November 2009 05:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ This is why it is better to use ORADIM, you have not to care of which service(s) you should handle

2/ [-STARTTYPE srvc|inst|srvc,inst]

3/ No, it is useful if you want to use the same scripts for different OS.

Regards
Michel
Re: How to disable oracle automatic STARTUP in Windows [message #430809 is a reply to message #430780] Thu, 12 November 2009 06:44 Go to previous message
dariyoosh
Messages: 538
Registered: March 2009
Location: France
Senior Member
Michel Cadot wrote on Thu, 12 November 2009 12:42
1/ This is why it is better to use ORADIM, you have not to care of which service(s) you should handle

2/ [-STARTTYPE srvc|inst|srvc,inst]

3/ No, it is useful if you want to use the same scripts for different OS.

Regards
Michel




Dear Michel,


Thanks a lot for this nice presentation (merci beaucoup pour ton aide cher ami!!)

Regards,
Dariyoosh
Previous Topic: ORA-12637
Next Topic: Encount ORA-00600 when setting audit_trail parameter
Goto Forum:
  


Current Time: Thu Mar 28 14:37:56 CDT 2024