FreeTDS - tsql connects, isql fails
Asked Answered
S

1

6

I'm trying to connect to a database on my host machine (windows xp, sql server 05). My guest machine is Ubuntu 10.04. I can connect and execute commands with tsql, but isql fails. Below are my config files and error messages.

freetds.conf

text size = 64512

[SQLEXPRESS]
host = 192.168.163.1
port = 1433
tds version = 7.0

odbcinst.ini

[FreeTDS]
Description     = TDS driver (Sybase/MS SQL)
Driver          = /usr/lib/odbc/libtdsodbc.so
Setup           = /usr/lib/odbc/libtdsS.so
CPTimeout       =
CPReuse         =
FileUsage       = 1

odbc.ini

[SQLEXPRESS]
Driver          = FreeTDS
Description     = ODBC connection via FreeTDS
Trace           = No
Servername  = 192.168.163.1
Database        = SCOPE_Peel
Port        = 1433
UID         = sa
PWD         = test1234
ReadOnly    = No

tsql:

tsql -S SQLEXPRESS  -U sa
#success

isql:

isql SQLEXPRESS sa test1234 -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
Selfcontradiction answered 4/11, 2011 at 14:2 Comment(0)
S
4

The issue was this line in odbc.ini

Servername = 192.168.163.1

It should have been SQLEXPRESS which I think points to the name of the server configured in freetds.conf

Selfcontradiction answered 4/11, 2011 at 14:17 Comment(1)
Hello, i have set the same Servername as SQLEXPRESS but still i am getting the same error.Narrative

© 2022 - 2024 — McMap. All rights reserved.