[freetds] Connectivity problem from Linux to Sql Server 2000usingFreeTDS
Murugesan, Prasanna Venkatesh
prasannavenkatesh.murugesan at etrade.com
Mon Oct 20 08:56:15 EDT 2008
I am able to connect to the sql server from the linux command prompt
. I don't have the write permission on the "freetds.conf" file ,so I
created ".freetds.conf" in my home directory and inserted the sqlserver
and used this in my prog , When I run my prog I am getting like this
DBI connect('server=LCYD2SQLONX1','ibia_ir',...) failed: OpenClient
message: LAYER = (6) ORIGIN = (8) SEVERITY = (5) NUMBER = (3)
Message String: ct_connect(): directory service layer: internal
directory control layer error: Requested server name not found.
at sql.pl line 10
Do I need to add this in the freetds.conf
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Tuesday, October 14, 2008 7:38 PM
To: FreeTDS Development Group
Subject: Re: [freetds] Connectivity problem from Linux to Sql Server
Murugesan, Prasanna Venkatesh wrote:
> I am trying to connect to sql server
> from the prompt using
> "TDSDUMP=freetds.log TDSVER=7.0 tsql -H10.182.92.68 -p3531 -Uibia_ir
> locale is "C"
> locale charset is "ANSI_X3.4-1968"
> Msg 18456, Level 14, State 1, Server , Line 0 Login failed for user
> Msg 20002, Level 9, State -1, Server OpenClient, Line -1 Adaptive
> Server connection failed There was a problem connecting to the server.
When you use the -P option, you must provide the password as an
$ tsql -S$S -U$U -P$P
locale is "C"
locale charset is "646"
Perhaps you're doing that, but your description above doesn't show it.
(It's always a good idea to capture the whole command line and output
verbatim. It avoids subtle oversights like that.)
Other than that, what you're doing looks good. Your log shows your
server is responding (as predicted). It's simply rejecting the
username+password pair you're providing. I have no doubt FreeTDS is
sending a proper login packet, because the server accepts the packet and
rejects the login.
If you want further verification, you can use TDS version 4.2 instead;
the log will show the login packet, including the password.
> I am using the sqlserver login in the user name and password switches
You should be able to use the same account with Microsoft's ISQL/OSQL
utilities. They won't use your domain login (if any) without explicit
direction. Make sure your Win32 box is set to use TCP/IP for its
connection to your server.
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
More information about the FreeTDS