Re: Connectivity problem from Linux to Sql Server 2000usingFreeTDS

"Murugesan, Prasanna Venkatesh" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <89DC7750D3800B40A55BFE80091DD38105DD12F0@atl1ex8.corp.etradegrp.com>
Hi James
 
   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
parameter like 
[LCYD2SQLONX1]
  host=LCYD2SQLONX1.corp.xxx.com
  port=3531
  tds version=7.0

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

Thanks,
Prasanna

-----Original Message-----
From: [email protected]
[mailto:[email protected]] 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
2000usingFreeTDS

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
-P"
>  
> locale is "C"
> locale charset is "ANSI_X3.4-1968"
> Msg 18456, Level 14, State 1, Server , Line 0 Login failed for user 
> 'ibia_ir'.
> Msg 20002, Level 9, State -1, Server OpenClient, Line -1 Adaptive 
> Server connection failed There was a problem connecting to the server.

Hi Prasanna, 

When you use the -P option, you must provide the password as an
argument,
e.g.:

	$ tsql -S$S -U$U -P$P
	locale is "C"
	locale charset is "646"
	1> 

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.  

HTH.  

--jkl
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.