@echo off
@echo 启动/关闭数据库
set /p flag=您是否要启动数据库?(是按Y启动,否按N关闭)

goto answer%flag%
goto end
:answery
echo 正在启动数据库..........................
net start OracleDBConsoleoracle
net start OracleMTSRecoveryService
net start OracleOraDb11g_home1TNSListener
net start OracleServiceORACLE
goto end
:answern
echo 正在关闭数据库..........................
net stop OracleDBConsoleoracle
net stop OracleMTSRecoveryService
net stop OracleOraDb11g_home1TNSListener
net stop OracleServiceORACLE
goto end
:end
pause

最后保存为bat文件

posted on 2016-03-03 14:36  阿郎  阅读(583)  评论(0编辑  收藏  举报