Skip to main content
Version: v23.0

T-SQL Commands to View AG Endpoints

Summary

The Transact-SQL commands to retrieve AG endpoint details.

Information

Use the following commands to retrieve AG endpoint details.

select * from sys.availability_group_listeners
select * from sys.availability_group_listener_ip_addresses
select * from sys.dm_tcp_listener_states
select * from sys.endpoints
caution

Unused endpoints can cause conflicts and may cause the AG setup to fail. Consult with your SQL Database Administrator before removing old endpoints.