gpt4 book ai didi

centos - FreeTDS - 无法连接 : Adaptive Server is unavailable or does not exist

转载 作者:太空宇宙 更新时间:2023-11-03 17:12:59 26 4
gpt4 key购买 nike

CENTOS 6.5 x86_64WHM 11.42.1unixODBC 2.2.14

freetds v0.91

我尝试连接到远程 MSSQL 服务器但没有成功 - 也尝试连接不同的 tds 版本(4.2、7.0、7.1、8.0)但都给出相同的结果。

使用相同的服务器名称、端口、用户名和密码,我可以使用 Win7 和 SQL Server Management Studio 通过我的桌面进行连接。

Telnet 也失败。

详情如下。如果您需要更多,请告诉我。感谢所有帮助/建议。

========

tsql -C

Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc
MS db-lib source compatibility: yes
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes

========

tsql -H testDSN -pXXXX -U 'testuser' -P 'testpass'

locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF8"
20Error 20009 (severity 9):
Unable to connect: Adaptive Server is unavailable or does not exist
OS error 110, "Connection timed out"
There was a problem connecting to the server

=======

isql -v testDSN 'testuser' 'testpass'

[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08S01][unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist
[ISQL]ERROR: Could not SQLConnect

========osql -S testDSN -U 'testuser' -P 'testpass'...

Configuration looks OK.  Connection details:

DSN: testDSN
odbc.ini: /etc/odbc.ini
Driver: /usr/lib64/libtdsodbc.so
Server hostname: winsrv106.pleskdns.co.uk
Address: x.x.x.x

Attempting connection as testuser ...
+ isql testDSN testuser 'testpass' -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08S01][unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist
[ISQL]ERROR: Could not SQLConnect
net.c:205:FAILED Connecting to x.x.x.x port XXXX (TDS version 7.1)

========

更多freetds.log

log.c:196:Starting log file for FreeTDS 0.91
on 2014-04-10 15:33:03 with debug flags 0x4fff.
iconv.c:330:tds_iconv_open(0x7233e0, UTF8)
iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:349:setting up conversions for client charset "UTF8"
iconv.c:351:preparing iconv for "UTF8" <-> "UCS-2LE" conversion
iconv.c:391:preparing iconv for "ISO-8859-1" <-> "UCS-2LE" conversion
iconv.c:394:tds_iconv_open: done
net.c:205:Connecting to x.x.x.x port XXXX (TDS version 7.1)
net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:306:getsockopt(2) reported: Connection timed out
net.c:316:tds_open_socket() failed
util.c:331:tdserror(0x723140, 0x7233e0, 20009, 110)
util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:384:tdserror: returning TDS_INT_CANCEL(2)
mem.c:615:tds_free_all_results()

========

远程登录 x.x.x.x

Trying x.x.x.x... 
telnet: connect to address x.x.x.x:
Connection timed out

最佳答案

我有同样的问题并通过使用自定义端口解决了它:端口 = XXXXX在 freetds.conf这个端口应该在 SQL Server Configuration Mgnt 中配置

SQL Server 网络配置 -> TCP/IP(已启用) -> IP 地址 -> IPAll -> TCP 动态端口

https://msdn.microsoft.com/en-us/library/ms177440.aspx

关于centos - FreeTDS - 无法连接 : Adaptive Server is unavailable or does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22991584/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com