How can we help?
Wrong availability group owner
When creating an availability group, the default owner of the availability group will be the person creating it. If that person leaves the company and the AD account is disabled, working with the availability group can cause problems. It is advised to set the availability group owner to the sa account.
To query the Performance Store database for wrong availability group owners, use:
select d.* from dbo.v_databases d inner join dbo.servers s on s.server_name = d.server_name left join dbo.database_owner_whitelist w on w.server_name = d.server_name and w.database_name = d.database_name and w.owner_name = d.owner_name where d.availability_group_owner_sid != 0x01 and d.state_desc = 'ONLINE' and w.server_name is null order by d.server_name, d.database_name
The alert will be visible on the Latest stats dashboard.
To exclude specific servers from this alert, see how to use the dbo.team_alert_exclude table in Alerting.