Discussion:
[freetds] is the server there?
Evan Panagiotopoulos
2012-10-16 12:54:20 UTC
Permalink
In the conf file I have
[MyServer2k]
host = 10.1.1.16
port = 1433
tds version = 8.0


When I go through the "is the server there?" steps I see the following:

root at kcsd-grades [/usr/local/etc/rc.d]# 27 > tsql -H 10.1.1.16 -p 1433 -U
osdadmin
locale is "C"
locale charset is "US-ASCII"
Password:
Msg 18456, Level 14, State 1, Server KCSD-ZONE-INT, Line 1
Login failed for user 'osdadmin'.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server
root at kcsd-grades [/usr/local/etc/rc.d]# 28 > tsql -S 10.1.1.16 -U osdadmin
locale is "C"
locale charset is "US-ASCII"
Password:
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

In the php script I have

putenv('FREETDSCONF=/usr/local/etc/freetds.conf');
$link = mssql_connect('10.1.1.16:1433', 'osdadmin', '...');
if (!$link) ...

In the php logs I see:

mssql_connect(): message: Login failed for user 'osdadmin'. (severity 14)


I know that the user ID and password that I am using are correct. We tested
them on the ms sql server and they worked.
HELP!
--
Evan Panagiotopoulos
Frediano Ziglio
2012-10-16 13:30:50 UTC
Permalink
Post by Evan Panagiotopoulos
In the conf file I have
[MyServer2k]
host = 10.1.1.16
port = 1433
tds version = 8.0
root at kcsd-grades [/usr/local/etc/rc.d]# 27 > tsql -H 10.1.1.16 -p 1433 -U
-H does NOT use freetds.conf, use -S, should work (if freetds.conf is
in the right directory).

Probably you want version 7.1 (8.0 is the "old" name for 7.1).
Post by Evan Panagiotopoulos
osdadmin
locale is "C"
locale charset is "US-ASCII"
Msg 18456, Level 14, State 1, Server KCSD-ZONE-INT, Line 1
Login failed for user 'osdadmin'.
Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.
There was a problem connecting to the server
root at kcsd-grades [/usr/local/etc/rc.d]# 28 > tsql -S 10.1.1.16 -U osdadmin
locale is "C"
locale charset is "US-ASCII"
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
In the php script I have
putenv('FREETDSCONF=/usr/local/etc/freetds.conf');
$link = mssql_connect('10.1.1.16:1433', 'osdadmin', '...');
if (!$link) ...
mssql_connect(): message: Login failed for user 'osdadmin'. (severity 14)
I know that the user ID and password that I am using are correct. We tested
them on the ms sql server and they worked.
HELP!
--
Evan Panagiotopoulos
Frediano
James K. Lowden
2012-10-16 15:35:40 UTC
Permalink
On Tue, 16 Oct 2012 08:54:20 -0400
root at ... > tsql -H 10.1.1.16 -p 1433 -U osdadmin
locale is "C"
locale charset is "US-ASCII"
Msg 18456, Level 14, State 1, Server KCSD-ZONE-INT, Line 1
Login failed for user 'osdadmin'.
Message 18456 came from the server named "KCSD-ZONE-INT". FreeTDS
transmitted the credentials you provided. If the server says your login
failed, it failed. :-(
root at ... > tsql -S 10.1.1.16 -U osdadmin
The -S causes tsql to look in freetds.conf. Unless you have an entry
like
[10.1.1.16]
host = 10.1.1.16

tsql will not use freetds.conf settings to connect to the server. It
may *connect* anyway, by converting (as a last-ditch effort) the string
to an address, but then likely as not it will fail to log in because
it won't use the right TDS version.

--jkl

Loading...