[freetds] Freetds.conf environment variable

Daniel Fazekas fdsubs at t-online.hu
Tue Jun 19 21:45:54 EDT 2007


On Jun 20, 2007, at 00:41, Rattan, Neeta S wrote:

> I did follow the advice of pointing my FREETDS environment variable  
> to the .conf file
> (for me in /etc/freetds.conf).

Where did you find this advice?
I'd think the easiest and most desirable option is to set the compile- 
type settings so that they already point to the correct place, rather  
than trying to override it later on.

In your case, that would be
./configure --sysconfdir=/etc
among your other options when configuring the FreeTDS build process.

> However, after a reboot of both server and client, I was unable to  
> connect w/ the -S option of tsql.  After trying to figure out what  
> the problem was, I stumbled across someone who had set $FREETDSCONF  
> instead - and when I tried this it worked.

That really does sound mysterious -- according to the docs,  
FREETDSCONF is but a deprecated old name for what is now the FREETDS  
environment variable.
http://www.freetds.org/userguide/envvar.htm

The environment variable you should try setting to understand what's  
going on is TDSDUMPCONFIG, which will output extensive debug info  
into the file specified on where FreeTDS tried to look for the config  
file.
http://www.freetds.org/userguide/logging.htm

A quick way using the bash shell:
TDSDUMPCONFIG=stdout tsql -S ......

> I'm not sure how to tell what version the tsql is.

tsql -C will output the freetds version number among others. There's  
no other version number besides that for tsql. It's only a testing  
tool to establish that your core FreeTDS set-up is working properly.

--
fds


More information about the FreeTDS mailing list