I have a SQL Server distributed availability group set up, and I'm currently connected to the forwarder instance. I would like to know how to use T-SQL to query the appropriate DMVs or catalog views to determine which instance is currently serving as the global primary in the distributed availability group.
I'm looking for a T-SQL script or query that I can execute on the forwarder instance to retrieve this information.
Any help or guidance on this topic would be greatly appreciated. Thank you in advance!