0

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

USE [master]
GO
ALTER AVAILABILITY GROUP [xxx]
MODIFY REPLICA ON N'xxx' WITH (SESSION_TIMEOUT = 30)
GO

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?

1
  • This is on prem Oct 12, 2023 at 12:05

1 Answer 1

3
+50

You want to alter the Distributed Availability Group and also Modify the Availability Group which is acting as a replica in the Distributed Availability Group. It's not intuitive nor is Docs forthcoming with any of that information.

Example:

ALTER AVAILABILTY GROUP [DistributedAGNameHere]
MODIFY AVAILABILITY GROUP ON 'AGNameUnderDistributedAG'
WITH (SESSION_TIMEOUT = 30)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.