Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Monday, 26 March 2012

Manage Oracle9i Services Under Windows

When Oracle9i is installed under the Windows operating system, it installs a number of services some of which are configured to start whenever Windows starts. While Oracle is running under Windows, it consumes a lot of resources and may not always be needed. You may find it useful to be able to shut down the database completely and quickly, without going through the Windows graphical interfaces.
As long as you have admin privileges, you can control any of the following services using the command net start to start a service and net stop to stop the service. In Windows XP, you can change the Startup Type parameter by going to the Services control panel, locating the service you wish to disable (OracleOraHome...), double-clicking on it to view the service properties, and changing the Startup Type property from Automatic to Manual.

The only service that needs to be running to be able to work with a database locally is the OracleServiceORCL service (where ORCL is the SID). This service will also automatically start up and shut down the database (using shutdown abort). If you installed a database, the default startup type will be Automatic. If you're primarily accessing a remote database, you can switch this to Manual startup type.
The OracleOraHome92HTTPServer service (where OraHome92 is the name of the Oracle Home) is the Apache server that you automatically install when you install Oracle. You generally only need it to access Web pages in the Oracle Apache directories, such as JSP and modplsql pages.
The OracleOraHome92TNSListener service is only needed if the database will be accessed remotely (either from another host or locally via a SQL*Net network protocol). You can access local databases without this service.
The OracleOraHome92ClientCache service caches Oracle Names data for connecting to remote databases. This service is normally configured for Manual startup type. However, it isn't necessary to run this service unless you have an Oracle Names server running somewhere.
There are four more services that are necessary for the Oracle Enterprise Manager: OracleOraHome92Agent (the Intelligent Agent), which monitors the database and Enterprise Manager requests and defaults to an Automatic startup type. OracleOraHome92SNMPPeerEncapsulator,OracleOraHome92SNMPPeerMasterAgent which handle the Secure Network Management Protocol service. OracleOraHome92PagingServer, which sends alerts out through an alphanumeric pager via a modem or e-mail.

The OracleMTSRecoveryService, which is optional, allows your database to be used as a resource manager for the Microsoft Transaction Server, COM/COM+ objects, and transactions in a distributed environment.
If you only use your database occasionally, you can create simple batch jobs to start up and shut down your database with a double-click, without going through the graphical interface.

Save a shortcut somewhere to launch these files automatically.
Set all your Oracle services to manual to avoid starting up with Windows boot.
REM "dbstart.cmd"
@echo off
set ORAHOME="OraHome92"
net start OracleService%ORASID%
REM net start Oracle%ORAHOME%HTTPServer
REM net start Oracle%ORAHOME%TNSListener
REM net start Oracle%ORAHOME%ClientCache
REM net start Oracle%ORAHOME%Agent
REM net start Oracle%ORAHOME%SNMPPeerEncapsulator
REM net start Oracle%ORAHOME%SNMPPeerMasterAgent
REM net start Oracle%ORAHOME%PagingServer
REM net start OracleMTSRecoverService

REM "dbshut.cmd"
@echo off
set ORAHOME="OraHome92"
net stop OracleService%ORASID%
REM net stop Oracle%ORAHOME%HTTPServer
REM net stop Oracle%ORAHOME%TNSListener
REM net stop Oracle%ORAHOME%ClientCache
REM net stop Oracle%ORAHOME%Agent
REM net stop Oracle%ORAHOME%SNMPPeerEncapsulator
REM net stop Oracle%ORAHOME%SNMPPeerMasterAgent
REM net stop Oracle%ORAHOME%PagingServer
REM net stop OracleMTSRecoverService


Post a Comment