Re: read-only intent with SQL Server availability group
Frediano Ziglio <[email protected]> Thu, 16 Nov 2017 16:32:43 +0000
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4dOhPuv7dHrBaVRm_OEQvSriX6R-_rOOB4XJ_2B57bzAg@mail.gmail.com> |
2017-11-16 2:28 GMT+00:00 Joshua Lang <[email protected]>: > When attempting to connect to SQL Server 2016 availability group listener, > I'm seeing a "Unexpected EOF from the server" error if read-only intent is > specified (this can be done via the freetds.conf file, for example). This > is using the latest dev1.00.308 code and an availability group with a > single secondary replica. > > The failure seems to come from the listener closing the connection after > sending an ENVCHANGE routing message (type 20) message to the client. See > https://msdn.microsoft.com/en-us/library/dd303449.aspx > > From my reading of the TDS protocol specification, it seems as though a TDS > 7.1 client and later should handle the ENVCHANGE routing message and > reconnect to the host specified in the routing message when the read-only > intent flag is set. > > Isn't the whole point of the read-only intent flag so that clients can be > routed to read-only replicas when possible? Note that FreeTDS does connect > successfully to the secondary (read-only) replica, and writes to it fail as > one would expect. Not implemented at all... but I don't think is hard to implement it, just a kind of reconnecting if you see the environment. Can you post a TDSDUMP (even privately) ? Frediano