SQL: Always On Availability Group - Listener
Author: jason
Date: 2014-05-08 14:25:46
Category: Musing

Here is small script to review the Availability Group Listener settings and state with tSQL.

Monitor Availability Groups: http://technet.microsoft.com/en-us/library/ff878305.aspx





Code

--Availability Group Listener
SELECT ag.name AvailabilityGroupName, l.dns_name, ip.ip_address, l.port, ip.state_desc
FROM sys.availability_group_listener_ip_addresses ip
INNER JOIN sys.availability_group_listeners l ON l.listener_id = ip.listener_id
INNER JOIN sys.availability_groups ag ON ag.group_id = l.group_id








jason @ jasonthomasfrance.com - www.masterstationlog.com - copyright 2009