Home > Database > Mysql Tutorial > body text

SQLSERVER服务手工启动 批处理文件

WBOY
Release: 2016-06-07 18:01:51
Original
1165 people have browsed it

装完SQLSERVER2005 因为开机很慢 所以呢就把开机服务搞成手动的了,这样开机快了很多可是问题也来了每次要用SqlServer的时候要一个一个服务去开起来

不比2000有个 开关的程序
所以上网找了下教程
自己写个 自动启动服务
哇哈哈
突然觉得 只要有网络 语言不是啥大的障碍
写起来都差不多呀
哇哈哈
话说最近又加了个ORACLE的服务
依然偷懒
把原先的改改用吧 哈哈
就成这样了
代码如下:
@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
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template