Groups | Blog | Home
all groups > sql server clients > january 2007 >

sql server clients : Msg 20009, Level 9, State 0, Server OpenClient, Line 0


samir
1/23/2007 8:18:10 AM
i can't connect to MS SQL 2000 server. Please advice. I am running
this from command line. Apache2, PHP5, Ubuntu Dapper.

0> /usr/local/freetds/bin/tsql -H [server] -p 1433 -U sa -P[password]
locale is "en_US.UTF-8"
locale charset is "UTF-8"
Msg 20009, Level 9, State 0, Server OpenClient, Line 0
Server is unavailable or does not exist.
There was a problem connecting to the server

This is what i get when my php script tries to connect to MS SQL:

Okay, mssql_connect function is there.

Warning: mssql_connect() [function.mssql-connect]: Sybase: Client
message: Server is unavailable or does not exist. (severity 78) in
/home/samirp/web/html/mssql.php on line 20

Warning: mssql_connect() [function.mssql-connect]: Sybase: Unable to
connect in /home/samirp/web/html/mssql.php on line 20

connection failed

Thanks
Sue Hoegemeier
1/23/2007 8:02:37 PM
Using the Sybase OpenClient driver isn't as reliable as it
used to be. It can work but it's easy to break. Another
option is to use a JDBC driver to connect to SQL Server.
Microsoft has JDBC drivers for SQL Server 2000 and 2005. You
can find the drivers at:
http://www.microsoft.com/downloads/
Just search on JDBC

There are third party drivers you could use as well. FreeTDS
or jTDS might be easier considerations as you may not have
to change much code. But you'd want to be careful with
critical apps. You can find more info on some of these and
info on other options in this article:
http://www.sommarskog.se/mssqlperl/unix.html

-Sue

On 23 Jan 2007 08:18:10 -0800, "samir" <dipusamir@gmail.com>
[quoted text, click to view]
AddThis Social Bookmark Button