Created
May 8, 2024 08:06
-
-
Save ghotz/21bd690bd23b2053af54b7ce3542b8bb to your computer and use it in GitHub Desktop.
Various Availability Groups metadata queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT AG1.[name] AS ag_name | |
, AL1.dns_name AS ag_listener_dns_name | |
, AL1.[port] AS ag_listener_tcp_port | |
, AL2.ip_address AS ag_listener_ip_address | |
, AL2.ip_subnet_mask AS ag_listener_ip_subnet_mask | |
FROM sys.availability_groups AS AG1 | |
JOIN sys.availability_group_listeners AS AL1 | |
ON AG1.group_id = AL1.group_id | |
JOIN sys.availability_group_listener_ip_addresses AS AL2 | |
ON AL1.listener_id = AL2.listener_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment