[freetds] Trouble logging into SQL Server using tsql
James K. Lowden
jklowden at freetds.org
Wed Feb 22 20:48:02 EST 2006
Chris Haag wrote:
> I am having trouble with what should be a simple authentication issue.
> I have attempted to do my homework and hope I am not missing something
> obvious. Thanks to anyone who takes a look!
> At a high level I get "login failed"
> -bash-3.00$ tsql -S BUSSYS -U 'CustomerSupport'
> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
> Msg 18456, Level 14, State 1, Server , Line 0
> Login failed for user 'CustomerSupport'.
> Msg 20014, Level 9, State 0, Server OpenClient, Line 0
> Login incorrect.
> There was a problem connecting to the server
> Obviously, I'd think bad credentials. However, from an XP laptop,
> using ODBC connections I can authenticate fine.
A little known "trick": if you use TDS 4.2, you will see the login packet
-- which includes your username and password -- transmitted to the
server. That packet is not logged by default with TDS 7.0+. In theory,
you should be able to set the debug flags to see it regardless, but that's
a future feature so far.
In my experience, some versions of Microsoft's tools ignore the non-domain
login if a domain login exists. If you use 4.2 and see the correct
username+password in the TDSDUMP log, then double check that the account
is really useable. I should oughta work.
More information about the FreeTDS