SQLSERVER Service Manual start of Batch File Processing

Source: Internet
Author: User
Tags mssqlserver

A program with no more than 2000 Switches
So I found the next tutorial online.
Write a batch to automatically start the service
Wow haha
I suddenly felt that network language was not a major obstacle.
Almost all of them are written.
Wow haha
An ORACLE service has been added recently.
Still lazy
Change the original version. Haha.
That's all.
Copy codeThe Code is as follows:
@ Echo off
Echo to enable SQLSERVER service by 1
Echo closes SQLSERVER service by 2
Echo to enable the ORACLE service by 3
Echo to disable ORACLE services by 4
Set/p ans =
If % ans % = 1 goto sts
If % ans % = 2 goto ovs
If % ans % = 3 goto sto
If % ans % = 4 goto Parameters
: Sta
Echo is about to enable SQLSERVER 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 is about to disable SQLSERVER 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 is about to enable the ORACLE service
Net start OracleDBConsoleorcl
Net start OracleOraDb10g_home1iSQL * Plus
Net start OracleOraDb10g_home1TNSListener
Net start OracleServiceORCL

Goto exit

: Bytes
Echo is about to disable the ORACLE service
Net stop OracleDBConsoleorcl
Net stop OracleOraDb10g_home1iSQL * Plus
Net stop OracleOraDb10g_home1TNSListener
Net stop OracleServiceORCL
Goto exit
: Exit
Echo over

Related Article

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.