[freetds] Setting for returned column size in FreeTDS?
kentozier at comcast.net
Fri Aug 18 15:55:29 EDT 2006
On Aug 18, 2006, at 11:46 AM, Lowden, James K wrote:
>> From: Ken Tozier
>> Sent: Friday, August 18, 2006 9:44 AM
>> On Aug 18, 2006, at 5:27 AM, Daniel Fazekas wrote:
>>> On Aug 18, 2006, at 6:47, Ken Tozier wrote:
>>>> I already set all copies on freetds.conf on our server to use
>>>> host = <correct domain here>
>>>> port = 1433
>>>> tds version = 8.0
>>> Have you confirmed that you are calling php's connection function,
>>> eg. mssql_connect(), with 'MyServer2k' as the first parameter?
>>> If not, your settings here are just being ignored as something
>>> which only applies to another server.
>> I wasn't using symbolic name,'MyServer2k' I was using the actual
>> host url. Will test, thanks
> Ah, that's the problem then. Maybe FreeTDS should come with a warning
> label: "Use as directed". ;-)
> FreeTDS looks up the name you provide in its configuration files,
> starting with freetds.conf. It looks it up by what the documentation
> calls the "dataserver" name e.g. 'MyServer2k', above. If you
> provide a
> hostname instead, that's considered an error.
> In the event the provided name is not found, the library will
> attempt to
> make the connection anyway using DNS name resolution or, in a last
> desperate attempt, it will try to convert it to an ip address. At
> point, though, it's no longer looking at your configuration files; any
> connection made that way will rely on built-in defaults or environment
> You can prove this all to yourself using tsql. Try:
> $ TDSDUMPCONFIG=stdout tsql -S dataserver -Ux -Px
> and compare with
> $ TDSDUMPCONFIG=stdout tsql -S hostname -Ux -Px
> In the first case you should see something like this:
> config.c:393:Got a match.
> config.c:413:option = 'host' value = '<correct domain here>'.
> config.c:440:Found host entry <correct domain here>.
> config.c:443:IP addr is <correct address here>.
> config.c:413:option = 'port' value = '1433'.
> config.c:413:option = 'tds version' value = '8.0'.
> In the second case you won't see that and are likely to see something
> config.c:974:Setting 'ip_port' to 1433 as a guess.
It helped a lot. Thanks for your patience.
I've had this limping along for a couple of months by using the host
address so I thought I was using it correctly but the recent addition
of > 255 char fields in the database suddenly broke everything.
More information about the FreeTDS