SQL Server service manually starts a batch file _mssql

Source: Internet
Author: User
Tags goto mssql mssqlserver
No more than 2000 programs that have a switch
So the internet to find the next tutorial
Write yourself a batch automatically start service
wow haha
Suddenly feel that as long as the Internet language is not a big obstacle
It's almost all written.
wow haha
I've recently added an Oracle service.
Still lazy
Just change the original, haha.
That's it.
Copy Code code as follows:

@echo off
echo Open SQL Server service Press 1
echo Shut down SQL Server service Press 2
Echo Open Oracle Service Press 3
Echo Closes Oracle Service Press 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 prepares to open SQL Server service
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 prepares to shut down SQL Server service
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 Ready to open Oracle Service
net start ORACLEDBCONSOLEORCL
net start Oracleoradb10g_home1isql*plus
net start Oracleoradb10g_home1tnslistener
net start ORACLESERVICEORCL

Goto exit

: Ovo
Echo prepares to shut down Oracle Services
net stop ORACLEDBCONSOLEORCL
net stop Oracleoradb10g_home1isql*plus
net stop Oracleoradb10g_home1tnslistener
net stop ORACLESERVICEORCL
Goto exit
: Exit
Echo Over

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.