Skip to Content.
Sympa Menu

freetds - Re: [freetds] Can connect with tsql but not with isql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Can connect with tsql but not with isql
  • Date: Tue, 12 Jan 2016 11:48:22 +0000

> From: Bilal Hasan <mithrazor AT gmail.com>
> To: freetds AT lists.ibiblio.org
> Cc:
> Date: Mon, 11 Jan 2016 08:13:51 -0600
> Subject: Can connect with tsql but not with isql
>
> I'm having an issue where I can connect to tsql but not through isql and
> DBD:ODBC which is my end goal. With DBD:ODBC it doesn't complain about not
> being able to connect. But I don't receive any data.
>
> I connect to tsql using:
>
> tsql -S MyDB-U MyUser
>
> But when I try to connect specifying the password in the command
> ie: tsql -S MyDB -U MyUser -P MyPass
>

That's weird. Are you sure you don't need to quote your password as
containing strange characters?

> It gives me the following error:
>
> locale is "en_US.UTF-8"
> locale charset is "UTF-8"
> using default charset "UTF-8"
> Msg 18456 (severity 14, state 1) from ELEONIE-VM4\SCMSERVER Line 1:
> "Login failed for user 'MyUser'."
> Error 20002 (severity 9):
> Adaptive Server connection failed
> There was a problem connecting to the server
>
> Now, when I try to connect using isql, I get a plain old data source not
> found error:
>
> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
> [37000][unixODBC][FreeTDS][SQL Server]Login failed for user 'RNDCIQReader'.
> [ISQL]ERROR: Could not SQLConnect
>
>
>
> Below is my odbc.ini:
>
> [MSSQL-MyDB]
> Driver = FreeTDS
> Servername = MyDB
> Port = 1433

Already in freetds.conf

> TDS Version = 8

Here should be TDS_Version or better remove as already in freetds.conf

> Thread safety: yes

weird syntax and I don't think is supported.

> Database = MyDB
> UID = MyUser
> PWD = MyPass
>

UID/PWD ignored

>
> Below is my freetds.conf:
>
> # $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
> #
> # This file is installed by FreeTDS if no file by the same
> # name is found in the installation directory.
> #
> # For information about the layout of this file and its settings,
> # see the freetds.conf manpage "man freetds.conf".
>
> # Global settings are overridden by those in a database
> # server specific section
> [global]
> # TDS protocol version
> ; tds version = 4.2
>
> # Whether to write a TDSDUMP file for diagnostic purposes
> # (setting this to /tmp is insecure on a multi-user system)
> ; dump file = /tmp/freetds.log
> ; debug flags = 0xffff
>
> # Command and connection timeouts
> ; timeout = 10
> ; connect timeout = 10
> # If you get out-of-memory errors, it may mean that your client
> # is trying to allocate a huge buffer for a TEXT field.
> # Try setting 'text size' to a more reasonable limit
> text size = 64512
>
> # A typical Sybase server
> [egServer50]
> host = symachine.domain.com
> port = 5000
> tds version = 5.0
>
> # A typical Microsoft server
> [egServer70]
> host = ntmachine.domain.com
> port = 1433
> tds version = 7.0
>
> [MyDB]
> host = ***.**.**.***
> port = 1433
> tds version = 8
>

8 does not make sense. 8.0 is obsolete. See
http://www.freetds.org/userguide/choosingtdsprotocol.htm

>
> And below is my odbcinst.ini file:
>
> # Example driver definitions
>
> # Driver from the postgresql-odbc package
> # Setup from the unixODBC package
> [PostgreSQL]
> Description = ODBC for PostgreSQL
> Driver = /usr/lib/psqlodbc.so
> Setup = /usr/lib/libodbcpsqlS.so
> Driver64 = /usr/lib64/psqlodbc.so
> Setup64 = /usr/lib64/libodbcpsqlS.so
> FileUsage = 1
>
>
> # Driver from the mysql-connector-odbc package
> # Setup from the unixODBC package
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/lib/libmyodbc5.so
> Setup = /usr/lib/libodbcmyS.so
> Driver64 = /usr/lib64/libmyodbc5.so
> Setup64 = /usr/lib64/libodbcmyS.so
> FileUsage = 1
>
>
> [FreeTDS]
> Description = ODBC for Microsoft SQL
> Setup = /usr/lib/libtdsS.so

Here you can use /usr/lib/libtdsodbc.so.0 too.

> Driver = /usr/lib/libtdsodbc.so.0
> Driver64 = /usr/lib64/libtdsodbc.so.0
> Setup64 = /usr/lib64/libtdsS.so

Did you compile 32 and 64 bit versions?

> UsageCount = 1
> Threading = 2
>

Why? Are you using an old unixODBC version, default is not working or
did you have issues with FreeTDS?

>
> I've been looking for a way to fix this for a couple days now. Please help!
> Any information would be appreciated
>

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page