Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 14-11-2023, 09:05 AM   #1
admin2
Administrator
 
Gia nhập: Oct 2021
Trả Lời: 16
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/


admin2 vắng mặt   Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:00 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.