In an AlwaysOn environment with backup preferences is set to Primary, I do not want the alert for Backup overdue and Log backup overdue
is it possible to remove backup alert on not readable databases in an AlwaysOn environment
This has been completed in SQL Monitor 5.0.2
-
Odd Mikalsen commented
We have implemented this in another monitoring tool to get backup status (minutes since last backup)
( http://technet.microsoft.com/en-us/library/ff877883.aspx )GRANT VIEW SERVER STATE TO [<user>];
GRANT VIEW DEFINITION ON AVAILABILITY GROUP ::<availability groups name> TO [<user>];if master.sys.fn_hadr_backup_is_preferred_replica ('<db_name>') <> 0
BEGIN
select
datediff(mi, max(s.backup_start_date), getdate()) %1440
from msdb.dbo.backupset s
where s.database_name = '<db_name>'
END
ELSE
BEGIN
Select '0'
END -
Odd Mikalsen commented
Hi!
I do not want to disable this alert, if I do that I have to manually set the alert on and off when I move the primary database between the nodes.
Regards Odd -
Thanks for your feedback John.
-
John McP commented
I am also looking for this feature.
Priya, I am currently doing what you are suggesting but this needs to be done every time the primary server is changed in the Availablity Group - its not ideal and can be easily forgotten.
The system function sys.fn_hadr_backup_is_preferred_replica can be used to determine if the server is currently the preferred backup server. -
Hi,
You can navigate to Configuration > Alert Settings page. Select the database on the left hand pane under "All servers". Then select 'Backup overdue' alert in right hand pane and disable this alert. Another way or quickest way to navigate to Alert settings page is, if you already have a 'Backup overdue' alert then open the alert and click on 'Configure alert...'.
Is this what you are after?
Thanks,
Priya