[freetds] Problem connecting to MS SQL Server 2000 from Linux

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Mar 19 07:26:57 EST 2004


> 
> Hi Folks,
> 
> I am new to FreeTDS and unixODBC stuff, so if I have done 
> something stupid
> please excuse me!  I am having problems connecting to 
> Microsoft SQL Server
> 2000.    After looking through the FreeTDS web site, I found that some
> required info is version, so I am using MS SQL Server 7.0 and 
> 2000, with
> FreeTDS 0.62.1 along with unixODBC 2.2.8 under SuSE Linux 7.2 on Intel
> hardware. ☺
> 
> I have compiled FreeTDS with these commands:
> 
> ./configure --with-tdsver=8.0 --with-unixodbc=/usr/local/unixodbc/
> --prefix=/usr/local/freetds-0.62.1
> make
> make install
> 
> I can connect to an MS SQL Server 7.0 with no problems as 
> shown below :
> 
> # ./tsql -S sql-int.oldham.gov.uk -U phpbb locale is
> "LC_CTYPE=en_GB at euro;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MO
> NETARY=C;LC_ME
> SSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_M
> EASUREMENT=C;L
> C_IDENTIFICATION=C"
> locale charset is "ISO-8859-1"
> Password:
> 1>
> 
> However when I try to connect to an MS SQL Server 2000 I get 
> problems :
> 
> # ./tsql -S sql03.oldham.gov.uk -U phpbb2dev locale is
> "LC_CTYPE=en_GB at euro;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MO
> NETARY=C;LC_ME
> SSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_M
> EASUREMENT=C;L
> C_IDENTIFICATION=C"
> locale charset is "ISO-8859-1"
> Password:
> There was a problem connecting to the server
> 
> I have checked, and double checked the username and password 
> so I am pretty
> sure this isn’t the problem.  If I set the 
> TDSDUMPCONFIG=/tmp/tds.log I get
> the following:
> 
> 11:46:06.605553 Failed in reading conf file.  Trying interface files.
> 11:46:06.605568 Looking for server sql03.oldham.gov.uk....
> 11:46:06.605695 Looking for server in /root/.interfaces.
> 11:46:06.605712 Searching interfaces file //root/.interfaces.
> 11:46:06.605734 Couldn't open /root/.interfaces.
> 11:46:06.605747 Looking for server in /etc/freetds/interfaces.
> 11:46:06.605760 Searching interfaces file /etc/freetds/interfaces.
> 11:46:06.605784 Couldn't open /etc/freetds/interfaces.
> 11:46:06.605797 Setting 'ip_port' to 1433 as a guess.
> 11:46:06.607598 tds_config_login:474: client_charset is ISO-8859-1.
> 
> There doesn’t seem Can anyone suggest why this could be happening?
> 
> Thanks,
> 
> Andrew McCall

As I can see you are trying tsql. -S option specify server in freetds.conf, not real host, perhaps you should use -H, for instance

./tsql -H sql03.oldham.gov.uk -p 1433 -U phpbb2dev

freddy77


More information about the FreeTDS mailing list