On Sun, Apr 18, 2010 at 10:17:41PM -0400, Benjamin Slade wrote:
>
> "James K. Lowden" wrote:
> >
> > Ben wrote:
> >> the central/default config file sets the 'text size' option, but some
> >> types of servers don't like the "set text size" command caused by
> >> that command (causes failed logins).
> >
> > I'm not aware of such servers. Could you be more specific?
> >
>
> The servers I'm talking about here are Sybase replication servers.
> They're actually based on the same run time core as the regular
> Sybase dataservers. In terms of market share, they're a very very
> small portion of the market.
Looking at the code again, "set text size" isn't sent if the in-memory value is zero. Can't you specify "text size = 0" in freetds.conf? If not, it wouldn't be hard to change config.c to look for, say, -1 and set the size to zero there, causing the statement not to be sent.
There might be a long-term solution anyway.
I've been thinking for a while that session properties need to be defined on a per-server basis (or globally). For instance, it would be nice if db-lib applications could have ANSI defaults set on by, er, default. That would among other things let them use indexed views without doing anything special.
The natural place for it would be freetds.conf. The "right" way to do it would be to introduce a panaply of options that the library would convert to SET statements, to be sent immediately upon logging in. The cheap way would be to point to a file containing SQL text to send after logging in. (I don't see SQL in freetds.conf itself as an option because it lacks a line-continuation syntax.)
This could be used for set textsize, too.
--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.