Skip to Content.
Sympa Menu

freetds - Re: [freetds] read-only intent with SQL Server availability group

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] read-only intent with SQL Server availability group
  • Date: Thu, 16 Nov 2017 16:32:43 +0000

2017-11-16 2:28 GMT+00:00 Joshua Lang <joshua.h.lang AT gmail.com>:
> 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




Archive powered by MHonArc 2.6.24.

Top of Page