Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Mssql( Microsoft SQL Server) (http://quantrinet.com/forum/forumdisplay.php?f=152)
-   -   Lập lịch tự động restart mssql hàng ngày với Scheduler Task on Windows (http://quantrinet.com/forum/showthread.php?t=10363)

admin2 14-11-2023 09:05 AM

Lập lịch tự động restart mssql hàng ngày với Scheduler Task on Windows
 
Lập lịch tự động restart service hàng ngày với Scheduler Task on Windows


Bài hướng dẫn sau sẽ hướng dẫn các bạn lập lịch tự động restart lại dịch vụ "MSSQL" hàng ngày
===> Để lập lịch restart lại service hàng ngày thì bạn chọn option:

1. Tạo file restartmssql.bat và cho lệnh restart mssql vào(thay thế tên mssql cho phù họp)

net stop MSSQL$MISASME2022
net start MSSQL$MISASME2022

2. Dùng Task Scheduler để lập lịch

Step 1: Open Task Scheduler ( Control Panel -> Administrative Tools -> Task Scheduler)


Step 2: Create Task

Name the task, description and select security options

Step 4: Create Task - Trigger. Set up scheduled to run the task



The below setting is to schedule the task to run daily at 4.00 AM


Step 5: Create Task - Action.

Trỏ đến file .bat



Step 6: Create Task - Conditions. Leave the default settings
Step 7: Create Task - Settings. Leave the default settings. Click Ok. You may be prompted to enter user account details.
Step 8: Verify the task in Task Scheduler library and test if your account can run the task

https://blog.sqlauthority.com/2007/0...ommand-prompt/


:battay:


Bây giờ là 04:27 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.