I have a Distributed Availability Group in my production environment that occasionally has a timeout.
When it does I get the following message in the AlwaysOn_health on the forwarder:
A connection timeout has occurred while attempting to establish a connection to availability replica 'xxx' with id [xxx]. Either a networking or firewall issue exists, or the endpoint address provided for the replica is not the database mirroring endpoint of the host server instance.
I wanted to try upping the connection timeout; it's currently set to the default of 10 seconds. I tried the following on the primary
ALTER AVAILABILITY GROUP [xxx]
MODIFY REPLICA ON N'xxx' WITH (SESSION_TIMEOUT = 30)
Since this is distributed, the replica is the underlying AG.
Running this I get the error: Cannot alter the availability group 'xxx', because it does not exist or you do not have permission.
I also tried on the forwarder, got the same error.
I am sysadmin, and the distributed AG shows up in sys.availability_groups, so it does exist and I do have permission.
How do I get around this error and modify session timeout on a replica for a Distributed Availability Group?