机器1:
>tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91.90
freetds.conf directory: /etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: no
我安装了freeTDS并能够连接到mssql,
> TDSVER=4.2 tsql -S xx.xx.xxx.xxx -U xxxx -P xxxx -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>
所以,当我尝试从TinyTds连接时,它会抛出以下错误,
Adaptive server is unavailable or does not exist
机器2:
配置与机器1中的配置相同,并且从这台机器,它连接到带有TinyTds的mssql
>tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91.90
freetds.conf directory: /etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: no
我安装了freeTDS并能够连接到mssql,
> TDSVER=4.2 tsql -S xx.xx.xxx.xxx -U xxxx -P xxxx -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>
Able to connect to the server using TinyTds
我不知道为什么会发生这种情况或在哪里检查,我不认为这是防火墙问题,因为我能够从终端连接,我也验证了它的凭据等,除了那些都是相同的连接不成功。任何帮助非常感谢!
注意:方案是,
我正在通过jenkins运行测试,它使用从属'machine1'运行ruby进程,在那里它无法连接到sqlserver(配置了freetds)抛出Adaptive Server不可用或不存在错误。
当我将奴隶修改为'machine2'时,它正在建立连接,尽管具有与machine1相同的freetds配置