Re: FreeTDS on Debian: connect to MSSQL with ODBC fails

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
2011/1/11 Boniforti Flavio <[email protected]>:
> Hello Frediano and thanks for getting back to me.
>
>> > root@ticket:~# isql -v sqlexpress sa
>> > [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to
>> data source
>> > [37000][unixODBC][FreeTDS][SQL Server]Accesso non riuscito per
>> > l'utente 'sa'.
>> > [ISQL]ERROR: Could not SQLConnect
>> >
>>
>> Mmmm... "[FreeTDS]" means that unixODBC is loading and using
>> FreeTDS driver. On the other side "Accesso non riuscito..."
>> means that isql is actually connecting to a sql server (the
>> Italian error came from sql server). If tsql works this means
>> that odbc driver should connect (no ssl or tcp/ip protocol
>> problems). I don't know how isql works without a password but
>> try to pass password to isql like
>>
>> # isql -v sqlexpress sa your_password
>>
>> This has security impacts (anybody logged in the system while
>> executing isql command can read command line!) but for a test
>> in your personal machine this is not a problem.
>
> Indeed, it *is* working when passing my password!!! Look:
>
> root@ticket:~# isql -v sqlexpress sa password
> +---------------------------------------+
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL>
>
> So, where may the problem lie?
>
> Thanks for helping me getting to this point.
>
> Flavio Boniforti
>

Well... the only problem I see is that not passing password to isql
cause an empty password to be used which (correctly) server refuse.
So... you get the connection, you can issue commands (you can try with
a "select @@version") and everything is working :)

Now... get to next step... PHP/Perl/whatever/C... I don't know... :)

freddy77
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.