I'm hoping someone experienced with Availability Groups can help me with this issue. Our environment consists of two clustered SQL 2014 Enterprise servers running one AlwaysOn Availability Group. One server is the primary and the other is the secondary. They are in separate subnets. When our web application calls the sql-listener the following error is thrown:[quote]The target database is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group.[/quote]The problem is our web application in the same subnet as the secondary replica (10.0.1.0/24) has the connection string directed at the sql-listener and the listener is not directing communication to the Primary like it should, instead it is directing it to the secondary. Our secondary is not accessible and not read-only for compliance reasons. As a workaround we've had to replace the connection string "sql-listener" with the primary replica hostname. This is bad since if it fails over, we'd have to manually replace the connection string to point to the secondary which should now be the active replica (correct me if I'm wrong).Primary:[img]http://drive.google.com/uc?export=view&id=0B0lE_qZgKlGlMVUxbWZxTk9UZFU[/img]Secondary:[img]https://drive.google.com/uc?export=view&id=0B0lE_qZgKlGlS3ZtQWVJeUczUE0[/img]Both listeners are in DNS:C:\Users\User1>nslookup sql-listenerServer: mydnsboxAddress: 10.0.0.64Name: sql-listener.mydomain.intAddresses: 10.0.1.92 10.0.0.82The connecting string "sql-listener" works in the 10.0.1.0/24 (secondary resides here) subnet but not in the 10.0.0.0/24 (primary resides here) subnet. All servers can communicate with each other in both subnets and ports aren't be restricted.
↧