Re: freeTDS to access sqlserverExpress

"Duncan Kerr" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Thanks for your replies yesterday.  I have been experimenting using your
suggestions, and have narrowed the problem down & discovered an issue (I
think).

 

I have 2 sqlserver instances on 2 different machines and I tries to
connect to the with

 

tsql and telnet ( as suggested ).

 

My ~/.freetds.conf looks like this

 

[xph]

    host = xph03846

    tds version=8.0

    instance=dkinstance

    port=1433

 

[mcdb]

    host = ntdevmog451

    tds version=8.0

    instance=ntdevmog451

    port=1433

 

========================================================================
===

Here is command output for various attempts.

========================================================================
===

 

xdevws85 apps% tsql -H xph03846 -p 1433 -U sa -P root -Lv

locale is "C"

locale charset is "ANSI_X3.4-1968"

Msg 20009, Level 9, State -1, Server OpenClient, Line -1

Unable to connect: Adaptive Server is unavailable or does not exist

There was a problem connecting to the server

xdevws85 apps% 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

Msg 20002, Level 9, State -1, Server OpenClient, Line -1

Adaptive Server connection failed

There was a problem connecting to the server

lxdevws85 apps% tsql -S xph -U sa -P root -Lv

locale is "C"

locale charset is "ANSI_X3.4-1968"

16connecting to instance dkinstance on port 0

There was a problem connecting to the server

lxdevws85 apps% 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

lxdevws85 apps% telnet xph03846 1433

Trying 10.222.136.219...

telnet: connect to address 10.222.136.219: Connection refused

telnet: Unable to connect to remote host: Connection refused

lxdevws85 apps% 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.

lxdevws85 apps%   

 

Finally you can see we connected with telnet.

 

Also, you can see that I can connect to my local servers with sqlcmd
like this, one works and one doesn't.

 

# ok

C:\Program Files\Microsoft SQL Server\100\Tools\Binn>SQLCMD.EXE -S
xph03846\dkinstance -U sa -P root

1>

 

# fails

C:\Program Files\Microsoft SQL Server\80\Tools\binn>sqlcmd -S
ntdevmog451\ntdevmog451 -U all

zse -P allzse

HResult 0xFFFFFFFF, Level 16, State 1

SQL Network Interfaces: Error Locating Server/Instance Specified
[xFFFFFFFF].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
establishing a conn

ection to the server. When connecting to SQL Server 2005, this failure
may be caused by the

fact that under the default settings SQL Server does not allow remote
connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

 

My problems are:-

 

1) I have put port 1433 into .freetds.conf, but the tsql seems to want
to connect with port 0 

2) What is "Unexpected EOF from server"  - 

3) What does connection refused mean - does this mean my xph server
isn't set up for remote sessions?

4) Am I contacting the servers at all with this, or am I still failing
to get any contact with the servers?

 

Any suggestions would be much appreciated.  

 

 

Duncan Kerr

NYSE Technologies 

t +44 (0)20 7655 7214

 

> -----Original Message-----

> From: [email protected] [mailto:freetds-

> [email protected]] On Behalf Of James K. Lowden

> Sent: 17 March 2009 01:34

> To: FreeTDS Development Group

> Subject: Re: [freetds] freeTDS to access sqlserverExpress

> 

> Robert Gonzalez wrote:

> > Just a heads up that telnet failure, for me, was

> > a false positive. But that was trying to hit SQL Server 2003 from
Ubuntu

> > linux.

> 

> I don't see how that's technically possible.  Telnet forms a TCP

> connection.  The server can't know it's not a TDS client because it
sends

> no data until you type something.

> 

> Are you saying that:

> 

>     $ TDSVER=7.0 tsql -H $H -p $port -U $U -P $P

> 

> works and

> 

>     $ telnet $H $port

> 

> fails?

> 

> If some combination of server and telnet don't work when they should,
we'd

> need to understand and document that.

> 

> --jkl

> 

> _______________________________________________

> FreeTDS mailing list

> [email protected]

> http://lists.ibiblio.org/mailman/listinfo/freetds


-----------------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.