Re: freeTDS to access sqlserverExpress

"Duncan Kerr" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
James

I still don't understand the distinction between port and instance for
freetds connection.  If I connect using port in my .conf file, I can ask
the sqlserver what it's instance name is, but if I then try and connect
using that instance name it fails, ie

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

lxdevws85 apps% tsql -S mcdb -U FUENV4\\fuadmin -P ful1ffe
locale is "C"
locale charset is "ANSI_X3.4-1968"
1> select @@ServerName
2> go

NTDEVMOG451
(1 row affected)
1>                              

Now, I put that name into .conf & I get

[mcdb]
    host = ntdevmog451
    tds version=8.0
    instance=NTDEVMOG451

lxdevws85 apps% tsql -S mcdb -U FUENV4\\fuadmin -P ful1ffe
locale is "C"
locale charset is "ANSI_X3.4-1968"
16There was a problem connecting to the server

This doesn't make sense.


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 22:34
> To: FreeTDS Development Group
> Subject: Re: [freetds] freeTDS to access sqlserverExpress
> 
> 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
> _______________________________________________
> 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.