Skip to Content.
Sympa Menu

freetds - Re: [freetds] freeTDS to access sqlserverExpress

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] freeTDS to access sqlserverExpress
  • Date: Tue, 17 Mar 2009 18:33:31 -0400

Duncan Kerr wrote:
> % telnet ntdevmog451 1433
>
> Trying 10.230.204.151...
>
> Connected to ntdevmog451.admin.liffe.com (10.230.204.151).
>
> Escape character is '^]'.
>
> ^]
>
> telnet> q
>
> Connection closed.

OK, this is good. we know *something* is listening to 1433 on ntdevmog451
and we're willing to believe it's SQL Server.

> % tsql -S mcdb -U 'allzse' -P allzse -Lv
> locale is "C"
> locale charset is "ANSI_X3.4-1968"
> 16connecting to instance ntdevmog451 on port 0
> There was a problem connecting to the server

The problem here is your freetds.conf entry:

> [mcdb]
> host = ntdevmog451
> tds version=8.0
> instance=ntdevmog451
> port=1433

You don't need instance and port; choose one. The instance is the name
of the port (basically), and in reading freetds.conf instance supersedes
port.

My guess is there's no *instance* named 'ntdevmog451'; the client queries
for it, the server says there is none, and the client tries to use port 0.
If you comment out the instance name (or use the right one) I bet it will
work.

> % tsql -H ntdevmog451 -p 1433 -U allzse -P allzse -Lv
> locale is "C"
> locale charset is "ANSI_X3.4-1968"
> Msg 20017, Level 9, State -1, Server OpenClient, Line -1
> Unexpected EOF from the server

I suspect your tsql commands are failing because the compiled-in default
TDS version is 5.0. "tsql -C" will confirm that. If so:

$ TDSVER=8.0 tsql -H ntdevmog451 -p 1433 -U allzse -P allzse

should work and

$ TDSVER=8.0 tsql -H ntdevmog451 -p 1433 -U allzse -P allzse -L

(using a recent snapshot) will return a list of instance names and their
ports.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page