T-SQL Commands to View AG Endpoints

Applies to…

  • DxEnterprise 19.0 and newer

Summary

The Transact-SQL commands to retrieve AG endpoint details.

Information

Use the following commands to retrieve AG endpoint details.

NOTE: Unused endpoints can cause conflicts and may cause the AG setup to fail. Consult with your SQL Database Administrator before removing old endpoints.
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