0

Is it possible to setup AG in sucha a way that Listener will work for 3+ replicas? I'd like to be able to connect to database using Listener, not matter which replica is Primary one, but I'm not understading how this should work.

Here's my setup in Azure (Windows Server 2019, SQL Server 2019)

Subnet-1:

ServerA, ServerB - for HA

Subnet-2:

ServerC - for DR

Each Server has primary and secondary (dedicated for listener) IP address.

ServerA - 10.0.1.7, 10.0.1.8

ServerB - 10.0.1.9, 10.0.1.10

ServerC - 10.0.2.5, 10.0.2.6

I connected them all in cluster and configured AG successfully.

Configured Listener - AGListener with secondary IP of ServerA and ServerC - 10.0.1.8, 10.0.2.6

It works fine when I connect to AGListener when Primary replica is either A or C, but just for tests I failedover to B and then it timeouts.

Is there a way to configure Listener to work on all replicas? Especially if we have more than 3?

This is not PRD setup, just trying different things in lab.

  • The way you've described it is how it should work. The behavior you're seeing is odd (to me) if Servers A & B are in the same subnet. When you fail over to ServerB, what do things look like from the Windows Cluster perspective? That is, what IP address is showing as active when you make ServerB the primary replica? – Ben Thul Feb 01 '23 at 15:42
  • @BenThul Just checked this - when I Failover from ServerA to ServerB, IP address Online is not changing. It is showing 10.0.1.8. – gluetornado Feb 01 '23 at 19:49
  • Okay. I'd check the configuration between nodes A & B then. IP configuration (for the instance), firewalls, etc. – Ben Thul Feb 01 '23 at 21:50

0 Answers0