sql-server – FreeTDS – tsql连接,isql失败

前端之家收集整理的这篇文章主要介绍了sql-server – FreeTDS – tsql连接,isql失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在尝试连接到我的主机上的数据库(windows xp,sql server 05).我的客户机是Ubuntu 10.04.我可以使用tsql连接和执行命令,但是isql失败.以下是我的配置文件错误消息.

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
最佳答案
问题在于odbc.ini中的这一行

Servername = 192.168.163.1

应该是sqlEXPRESS,我认为它指向freetds.conf中配置的服务器的名称

猜你在找的Linux相关文章