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!