翻硬盘看到。备份下
@echo off
title sql启动选择
set /p cho= 请选择(1。开启 2。关闭):
if %cho%==1 goto 1
if %cho%==2 goto 2
exit
:1
net start w3svc
net Start sqlserveragent
net start mssqlserver
net start msftesql
net start sqlwriter
echo 开启服务成功,按任意键退出……&&pause>nul&&exit
:2
net stop w3svc
net stop sqlserveragent
net stop mssqlserver
net stop msftesql
net stop sqlwriter
echo 开启服务成功,按任意键退出……&&pause>nul&&exit