Skip to Content.
Sympa Menu

freetds - RE: [freetds] A little help please!

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Joseph Geiser" <joe AT mail.paravisions.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] A little help please!
  • Date: Fri, 16 Jul 2004 07:59:13 -0400

Hi Matthew,

> I am can connect to my database using ./tsql -H hostname -p
> port - U username
> and do queiries etc.
>
> However when I try to use the freetds.conf file which has an
> entry like this (connecting to sybase 11.5)
> [ServerName]
> host = XXXXX
> port = 4000
> tds version = 5.0
>
> ./tsql -S ServerName -U XXXX -I ~/.freetds.conf
>
> It asks for the password and I get the unhelpful error message
> "There was a problem connecting to the server" and nothing else.

1. Make sure the TDS version is compatible with the server. For example,
if SQL Server 7.0 or 2000, it should be TDS 7.0

2. Make sure that freetds files are accessible. If you use tsql from
another directory other than /usr/local... (where it usually installs), and
the program cannot be run, then the config files are inaccessible as well
which would cause your error.

3. Make sure the [ServerName] is the one used in the tsql -S parameter, the
-U is a valid username. The message could also be indicative of an
incorrect IP/host name in freetds.conf or an invalid username for the
server.

4. Lastly, make sure the server is listening on the port you specify.
MSSQL listens on 1433 by default unless it's changed on the SQL Server
itself. Sybase, I believe, listens on 5000 by default.

If you are testing, I would set up a plain, vanilla DB Server (MSSQL or
Sybase) listening on the standard port, and install freetds into its default
location on the server (/usr/local or /usr/local/freetds). Then update
/usr/local[/freetds]/etc/freetds.conf with something that looks like this
(for MSSQL 7 or 2000):

[SERVERNAME]
Host = [fully qualified hostname or ip address]
Port = 1433
TDS Version = 7.0

Here's a munged version of one of ours:

[daffyduck]
host = daffyduck.domain.com
port = 1433
tds version = 7.0

(we don't use 1433 and no, there's no daffyduck here, but it's damned close
;)

Hope this is helpful.

Regards,
Joe Geiser



Archive powered by MHonArc 2.6.24.

Top of Page