How to realize the batch processing of sqlserver database service startup and shutdown
This article will explain in detail how to realize the batch processing of sqlserver database service startup and shutdown. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The code is as follows:
@ echo off set / p choi= starts the database and stops the database [BMague]? If / I% choi% equ b goto beginserver if / I% choi% equ e goto endserver: beginserver net start mssqlserver goto end1: endserver net stop mssqlserver goto end2: end1 @ echo * * @ echo * * started successfully! You need to reopen this file before you can use the command * @ echo * * @ pause: end2 @ echo * * * @ echo * * stopped successfully! You need to reopen this file before you can use the command * @ echo * * @ pause again. This is the end of the article on "how to implement batch processing of sqlserver database service startup and shutdown". I hope the above content can be of some help to you. So that you can learn more knowledge, if you think the article is good, please share it for more people to see.