ORACLE批处理

用于自动启动和关闭Oracle数据库服务

@ECHO OFF 
for /f "skip=3 tokens=4" %%i in ('sc query OracleServiceORCL') do set "zt=%%i" &goto :next 
:next
if /i "%zt%"=="RUNNING" (
ECHO 停止 Oracle 服务, 请等待 ... 
net stop OracleServiceORCL
net stop OracleDBConsoleorcl
net stop OracleOraDb11g_home3TNSListener
)else ( 
ECHO 启动 Oracle 服务, 请等待 ... 
net start OracleServiceORCL
net start OracleDBConsoleorcl
net start OracleOraDb11g_home3TNSListener
) 
pause
exit
#该片段来自于http://outofmemory.cn

相关文章