我正在尝试从 Ubuntu 14.04.4 服务器连接到在 Windows 10 上运行的 Pervasive Sql Server。
我正在使用以下服务尝试连接到服务器:
FreeTDS
unixODBC
在开始之前,我尝试从 vm 控制台成功 ping 主机。
然后我运行以下命令来检查 FreeTDS 是否已正确安装;
tsql -C
哪个返回:
Compile-time settings (established with the "configure" script)
Version: freetds v0.95.95
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: no
GnuTLS: no
[/usr/local/etc] 中的 [freetds.conf] 包含:
[PSQLServer]
host = **IP**
port = **PORT**
tds version = 8.0
[odbc.ini] 位于 [/usr/local/etc] 包含:
[PSQLClient]
Description = Pervasive SQL Client Settings
Driver = FreeTDS
ServerName = PSQLServer
Database = **DBNAME**
Trace = No
UID = **USERNAME**
PWD = **PASSWORD**
TDS_Version = 8.0
[odbcinst.ini] 位于 [/usr/local/etc] 包含:
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
TDS_Version = 8.0
我厌倦了使用 tsql 命令为每个可能的驱动程序版本添加 [TDSVER=*],导致每个 TDSVER 出现相同的错误消息。
*[5.0]、*[6.0]、*[7.0]、*[7.1]、*[7.2]、*[7.3]、*[7.4]、*[8.0]
使用以下命令测试连接时:
TDSVER=8.0 tsql -S PSQLClient -U **USERNAME** -P **PASSWORD**
返回以下错误:
Error 20012 (severity 2):
Server name not found in configuration files.
locale is "en_ZA.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20013 (severity 2):
Unknown host machine name.
There was a problem connecting to the server
在尝试了上述之后,我又尝试了 isql 命令:
isql -v PSQLClient **USERNAME** **PASSWORD**
它返回以下错误消息:
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
[ISQL]ERROR: Could not SQLConnect
甚至可以通过 [node-odbc] 连接到 [Pervasive SQL],如果可以,我做错了什么?
任何帮助将不胜感激!