We are not receiving the alerts when windows reboot , how to get the alerts when Windows SQL server reboot.
SQLDM isn't really designed as a Windows monitoring tool. As such, there isn't a metric that's built-in that specifically checks when the server was rebooted.
However, you could potentially make use of the Custom Counter feature. You could potentially create a T-SQL script that queries the instance to see when the instance was last restarted and compare the timestamp to the current time. Another option would be to create a custom counter based on a WMI counter. I suspect there ought to be some WMI counter that's related to the last server boot up timestamp.
Hope that helps!
Thanks for Suggestion, i am creating the new custom counter for this alerts, when I am creating the custom, i am getting confusing while selecting the warning and critical values since I need to receive alert when server SQL reboot time less than 5-10 minutes (select DATEDIFF(MINUTE,create_date, GETDATE()) as Reboottime from sys.databases where name='tempdb'). can you please help me set those values.
When you configure the custom counter, I would probably select the Lower values are worse than higher values option. For the threshold settings, I would probably set Critical at 10 (for 10 minutes) and higher values for information and warning, then save the custom counter.
Once you have the custom counter created, link it to your monitored instances or even an alert template. If you don't care about warning or information statuses, you can then go configure the alert thresholds for the instances that you applied the custom counter to and disable the warning and information statuses.
I hope that helps.
I have created the custom counter using TSQL script and selected the lower values option and created the action and alert for same but I am not receiving the alerts after restarting the windows server but I can see that server in a critical state . can you please help me.
When you say that you created an action, does that mean that you created an alert response? After restarting the server, was an alert raised for the custom counter that you created? If the custom counter raised an alert, then I think you may need to create an alert response so that SQLDM can send an email notification (if that's what you are looking for).
yes, i have created the action and response.
1. created the Windows restart customer counter by using TSQL script.
2. Added to one server and set the critical and warning threshold values.
3. Created the one Action and response like it will check the alert and raise the mail notification.
Here i am able to see the critical notification in SQLDM but not getting the email notification alert like disk space alerts.
If SQLDM is generating the alert as expected, then the problem is most likely with the configuration of the alert response. Can you post a screenshot of the alert response so that I can review it?
Please see here its showing critical as i set the Critical value is 10 (Minutes)
Action and Response :
I am receiving the alerts for blocking
Looking purely at the alert response, it does appear to be configured properly. If you're not getting an email though, I would recommend opening up a support ticket. I think the DM logs will be useful to review.
Are the responses coming for any other alerts? Or is this alert response the only one that isn't working?
we are receiving the other alerts but not receiving this reboot alerts.we are using below TSQL script
select DATEDIFF(MINUTE, create_date, GETDATE()) from sys.databases where name like '%tempdb%' and database_id=2
Powered by IDERA