In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shares with you about how to use batch processing to start and stop services. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Start or stop the service using the net.exe feature that comes with windows
The command line format for starting / stopping the service is: net start / stop service name (Note: the service should be set to manual startup type first)
Example:
Take starting and stopping the Oracle11g service as an example (ORCL is the database name):
The code is as follows:
Start the service of Oracle
@ echo. The service is started.
@ echo off
Net start OracleVssWriterORCL
Net start OracleDBConsoleorcl
Net start OracleOraDb11g_home1TNSListener
Net start OracleServiceORCL
@ echo. Activation complete!
@ pause
Stop the service of Oracle
The code is as follows:
@ echo. The service is stopping.
@ echo off
Net stop OracleVssWriterORCL
Net stop OracleDBConsoleorcl
Net stop OracleOraDb11g_home1TNSListener
Net stop OracleServiceORCL
@ echo. The service has stopped!
@ pause
Startup method:
Method 1. After saving, you can start or shut down the service directly by double-clicking the file.
Method 2. Set environment variabl
In the system variable in the environment variable, add the path to the batch file after PATH, don't forget to use the semicolon; separate it from the previous environment variable, and then enter the executable file directly in the start menu (the function of the environment variable is to tell the system where to enter information while it is running)
Thank you for reading! This is the end of this article on "how to use batch processing to start and stop services". 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, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.