时间:2021-07-01 10:21:17 帮助过:33人阅读
装完SQLSERVER2005 因为开机很慢 所以呢就把开机服务搞成手动的了,这样开机快了很多可是问题也来了每次要用SqlServer的时候要一个一个服务去开起来
不比2000有个 开关的程序
@echo off
echo 开启SQLSERVER服务按1
echo 关闭SQLSERVER服务按2
echo 开启ORACLE服务按3
echo 关闭ORACLE服务按4
set /p ans=
if %ans%==1 goto sts
if %ans%==2 goto ovs
if %ans%==3 goto sto
if %ans%==4 goto ovo
:sta
echo 准备开启SQLSERVER服务
net start SQLWriter
net start ReportServer
net start MsDtsServer
net start msftesql
net start SQLBrowser
net start MSSQLSERVEROLAPService
net start SQLSERVERAGENT
net start MSSQL$SQLEXPRESS
net start MSSQLSERVER
goto exit
:ovs
echo 准备关闭SQLSERVER服务
net stop SQLWriter
net stop ReportServer
net stop MsDtsServer
net stop msftesql
net stop SQLBrowser
net stop MSSQLSERVEROLAPService
net stop SQLSERVERAGENT
net stop MSSQL$SQLEXPRESS
net stop MSSQLSERVER
goto exit
:sto
echo 准备开启ORACLE服务
net start OracleDBConsoleorcl
net start OracleOraDb10g_home1iSQL*Plus
net start OracleOraDb10g_home1TNSListener
net start OracleServiceORCL
goto exit
:ovo
echo 准备关闭ORACLE服务
net stop OracleDBConsoleorcl
net stop OracleOraDb10g_home1iSQL*Plus
net stop OracleOraDb10g_home1TNSListener
net stop OracleServiceORCL
goto exit
:exit
echo over