用sqlServer服务管理器配置太慢了 , 直接批处理开关
@echo off title=SQL Server(SQLEXPRESS)2008服务开关 by gazi :start cls color 0E mode con: cols=52 lines=20 echo 输入1开启 echo 输入2关闭 echo. set xz= set /p xz=请输入: if /i "%xz%"=="1" goto :open if /i "%xz%"=="2" goto :close echo. echo 请正确输入 & ping -n 3 127.1>nul & goto :start :open net start "SQL Server (SQLEXPRESS)" ping -n 3 127.1>nul & exit :close net stop "SQL Server (SQLEXPRESS)" taskkill /f /im sqlservr.exe taskkill /f /im sqlwriter.exe ping -n 3 127.1>nul & exit