Discussion:
[freetds] Connection/Password Error
Derrick Betts
2013-08-26 18:19:48 UTC
Permalink
I'm recently installed FreeTDS v 0.91 on RedHat 6.1. I'm attempting to
connect to MSSQL 2005.



On the command line, I can connect just fine using this:

tsql -S MyMSSQLServer -U sa



I am then prompted for the password. I enter the password,
and the system connects and I can run SQL commands against the DB. All is
well.



However, when I attempt to connect this way:

tsql -S MyMSSQLServer -U sa -P specialpassword



I get a "Login failed for user 'sa'. Obviously the password
I'm using for the command line argument is identical to the password I'm
using when prompted for the password.



I've searched through as much documentation as I can find, but can't figure
out how to setup the *.conf files or configure FreeTDS any differently so
that the password can be passed as a command line argument and connect. Any
ideas what I can try next?



Thanks,
Derrick
Derrick Betts
2013-08-27 02:21:41 UTC
Permalink
Found the problem:

It was a simple issue of quotes. The password argument
needed single quotes around it. Once the single quotes were added to the
password, everything worked as expected.



Derrick



From: Derrick Betts [mailto:derrick at blueaxis.com]
Sent: Monday, August 26, 2013 12:20 PM
To: FreeTDS at lists.ibiblio.org
Subject: Connection/Password Error



I'm recently installed FreeTDS v 0.91 on RedHat 6.1. I'm attempting to
connect to MSSQL 2005.



On the command line, I can connect just fine using this:

tsql -S MyMSSQLServer -U sa



I am then prompted for the password. I enter the password,
and the system connects and I can run SQL commands against the DB. All is
well.



However, when I attempt to connect this way:

tsql -S MyMSSQLServer -U sa -P specialpassword



I get a "Login failed for user 'sa'. Obviously the password
I'm using for the command line argument is identical to the password I'm
using when prompted for the password.



I've searched through as much documentation as I can find, but can't figure
out how to setup the *.conf files or configure FreeTDS any differently so
that the password can be passed as a command line argument and connect. Any
ideas what I can try next?



Thanks,
Derrick

Loading...