View Availability Group Listener Properties (SQL Server)
Applies to:
SQL Server
This topic describes how to view the properties of an Always On availability group listener by using SQL Server Management Studio or Transact-SQL in SQL Server.
Using SQL Server Management Studio
To view listener properties
In Object Explorer, connect to a server instance that hosts any availability replica of the availability group whose listener you want to view. Click the server name to expand the server tree.
Expand the Always On High Availability node and the Availability Groups node.
Expand the node of the availability group, and expand the Availability Groups Listeners node.
Right-click the listener that you want to view, and select the Properties command.
This opens the Availability Group Listener Properties dialog box. For more information, see Availability Group Listener Properties (Dialog Box), later in this topic.
Availability Group Listener Properties (Dialog Box)
Listener DNS Name
The network name of the availability group listener.
Port
The TCP port used by this listener.
Note
If you are connected the primary replica, you can use this field to modify the port number of the listener. This requires ALTER AVAILABILITY GROUP permission on the availability group, CONTROL AVAILABILITY GROUP permission, ALTER ANY AVAILABILITY GROUP permission, or CONTROL SERVER permission.
Network Mode
Indicates the TCP protocol used by the listener, one of:
DHCP
The listener uses an dynamic IP address that is assigned by a server running the Dynamic Host Configuration Protocol (DHCP).
Static IP
The listener uses one or more Static IP addresses. To access the different subnets, an availability group listener must use static IP addresses.
The grid displays each of the subnets on which the listener listens and the IP address associated with that subnet.
Using Transact-SQL
To view listener properties
To monitor the availability group listeners, use the following views:
sys.availability_group_listener_ip_addresses
Returns a row for every conformant virtual IP address that is currently online for an availability group listener.
Column names: listener_id, ip_address, ip_subnet_mask, is_dhcp, network_subnet_ip, network_subnet_prefix_length, network_subnet_ipv4_mask, state, state_desc
sys.availability_group_listeners
For a given availability group, returns either zero rows indicating that no network name is associated with the availability group, or returns a row for each availability-group listener configuration in the WSFC cluster.
Column names: group_id, listener_id, dns_name, port, is_conformant, ip_configuration_string_from_cluster
sys.dm_tcp_listener_states
Returns a row containing dynamic-state information for each TCP listener.
Column names: listener_id, ip_address, is_ipv4, port, type, type_desc, state, state_desc, start_time
Note
For more information about using Transact-SQL to monitor your Always On availability groups environment, see Monitor Availability Groups (Transact-SQL).
Related Tasks
See Also
Overview of Always On Availability Groups (SQL Server)
Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server)
Monitor Availability Groups (Transact-SQL)