1 @echo off 2 echo *************************************** 3 echo * 1.启动oracle * 4 echo * 2.关闭oracle * 5 echo * 3.启动oracle监听 * 6 echo * 4.关闭oracle监听 * 7 echo * 0.退出 * 8 echo *************************************** 9 10 for /l %%a in () do ( 11 call:loop 12 13 ) 14 15 :loop 16 set/p a1=请选择服务: 17 18 if "%a1%"=="1" ( net start OracleServiceYANNI) 19 if "%a1%"=="2" ( net stop OracleServiceYANNI) 20 if "%a1%"=="3" ( lsnrctl start yanniListener) 21 if "%a1%"=="4" ( lsnrctl stop yanniListener) 22 if "%a1%"=="0" ( exit)