Bat file restart SQL Service and IIS service

Source: Internet
Author: User

Bat file restart SQL Service and IIS service
Sqlserver has the automatic backup function, so you need to restart two servers. The restart script is shown below. The script name is as follows: SQL _restart.bat net stop sqlserveragent net stop mssqlserver net start sqlserveragent SQL Server Agent is a task scheduler and alarm manager. in practical applications and environments, you can define periodic activities as a task and enable them to run automatically with the help of the SQL Server Agent. If you are a system administrator, you can use the SQL Server Agent to notify you of some warning information to locate the problem and improve management efficiency. The SQL Server Agent mainly includes the following components: Job, alarm, and operation. The following is a restart script with the Script Name: iis_restart.bat restart IIS service. net stop W3SVC net start W3SVC cmd. Finally, use the windows scheduled task to execute the preceding file to start-> Program-> accessories-> System Tools-> Task Plan-> Add task Plan, confirm to start every day!

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.