sql 服务启动命令

时间:2024-03-08 10:59:24

@echo off
color 2F
echo ---------------------------------------------------------------------------
echo  -------------------------------mile---------------------------------------
echo.
:RE
SET /P ST=打开/关闭   请输入 1 (打开)或 2 (关闭)或3(退出):
echo.
if /I "%ST%"=="1" goto ST
if /I "%ST%"=="2" goto EX
if /I "%ST%"=="3" goto 12


:EX
net stop mssqlserver
GOTO 11

:ST
net start mssqlserver
GOTO 11

:11
SET /P ST= 继续/退出  请输入 1 (继续)或 2 (退出):
echo.
if /I "%ST%"=="1" goto RE
if /I "%ST%"=="2" goto 12

:12