Re: Adaptive Server connection failed (Php + freetds)

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Frederick William Borges Pohl wrote:
> 
> ./tsql -H <ip_address> -p 1433 -U <username>
> 
> The result was:
> 
> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
...
> Msg 20009, Level 9, State -1, Server OpenClient, Line -1
> 
> Unable to connect: Adaptive Server is unavailable or does not exist

You're probably not using the right TDS version.  When you use "tsql -H",
you're bypassing freetds.conf.  The TDS version used depends on the
built-in options (which you can check with "tsql -C").  

Since you're using --with-mssql, I suppose you're connecting to a
Microsoft server, so you want:

	$ TDSVER=7.0 ./tsql -H ip_addr -p 1433 -U user

or, better, 

	$ ./tsql -S servername -U username

TDSDUMP and TDSDUMPCONFIG should tell you anything else you need to know. 


HTH.

--jkl
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.