We have a SQL 2012 AlwaysOn Availibility Group with 2 nodes. We have synchronous commit between the 2 replicas. They are both set to accept ReadOnly connections when acting as secondaries and to accept All Connections when acting as Primary.
We have ReadOnly routing setup for readonly traffic via the listener and with ApplicationIntent=ReadOnly in the connection string. It all works fine.
A couple of days ago we rebooted the readable secondary and during the time it was down, the readonly traffic failed to connect to a readable secondary (as expected), but wasn't redirected to the Primary as I thought it would. Instead the following error was received
Unable to access the SalesDb database because no online secondary replicas are enabled for read=only access.
My question is, if no readable secondary replicas are available for some reason, does the readonly traffic not get routed to the Allow All Connections Primary replica by the listener, rather than getting a connection error?
Any answers gratefully received.
AcombLil