IT Notes‎ > ‎Database‎ > ‎Oracle‎ > ‎

停止和启动 Oracle 9i 服务的 Windows 脚本

OS: Windows XP
Oracle: 9i
 
安装了Oracle 9i到小本后, 会默认开启一些服务, 机器因此慢死了, 如下图:

上图的服务列表说明如下:
1. Oracle WebLogic NodeManager
2. OracleMTSRecoveryService 默认自动启动
3. OracleOraHome9启动2Agent 默认不启动
4. OracleOraHome92HTTPServer 默认不启动
5. OracleOraHome92PagingServer 默认不启动
6. OracleOraHome92NMPPeerEncapsulator 默认不启动
7. OracleOraHome92NMPPeerMasterAgent 默认不启动
8. OracleOraHome92TNSListener 需启动
9. OracleServiceIRIDIUM 需启动

把自动启用的服务都改成手动了. 为了停止和启动相关服务的方便, 特写了两段脚本:

文件名: start oracle.cmd
=========================================
Rem 启动Oracle相关服务

Rem C:\oracle\ora92\bin\omtsreco.exe "OracleMTSRecoveryService"
net start OracleMTSRecoveryService

Rem C:\oracle\ora92\bin\agntsrvc.exe
net start OracleOraHome92Agent

Rem "C:\oracle\ora92\Apache\Apache\apache.exe" --ntservice
net start OracleOraHome92HTTPServer

Rem C:\oracle\ora92\BIN\TNSLSNR
net start OracleOraHome92TNSListener

Rem c:\oracle\ora92\bin\ORACLE.EXE IRIDIUM
net start OracleServiceIRIDIUM
=========================================

文件名: stop oracle.cmd
=========================================
Rem 停止Oracle相关服务

Rem C:\oracle\ora92\bin\omtsreco.exe "OracleMTSRecoveryService"
net stop OracleMTSRecoveryService

Rem C:\oracle\ora92\bin\agntsrvc.exe
net stop OracleOraHome92Agent

Rem "C:\oracle\ora92\Apache\Apache\apache.exe" --ntservice
net stop OracleOraHome92HTTPServer

Rem C:\oracle\ora92\BIN\TNSLSNR
net stop OracleOraHome92TNSListener

Rem c:\oracle\ora92\bin\ORACLE.EXE IRIDIUM
net stop OracleServiceIRIDIUM
=========================================

Comments