cmd脚本之启动/关闭Oracle服务
背景:
最近电脑上在跑虚拟机,16G内存已经不够用了,时常发生软件因内存不够崩溃的情况,打开任务管理器一看Oracle服务占了2G多内存,平时也不怎么用,关掉吧,就写了这个脚本;
启动Oracle服务脚本
@echo off net.exe session 1>NUL 2>NUL && ( net start OracleDBConsoleorcl net start OracleMTSRecoveryService net start OracleOraDb11g_home1TNSListener net start OracleServiceORCL echo Oracle Service Start Success! ) || ( echo Need Administrator Authority Run! ) pause
关闭Oracle服务脚本
@echo off net.exe session 1>NUL 2>NUL && ( net stop OracleVssWriterORCL net stop OracleDBConsoleorcl net stop OracleJobSchedulerORCL net stop OracleMTSRecoveryService net stop OracleOraDb11g_home1ClrAgent net stop OracleOraDb11g_home1TNSListener net stop OracleServiceORCL echo Oracle Service Close Success! ) || ( echo Need Administrator Authority Run! ) pause