gpt4 book ai didi

sql-server - 无法连接: Adaptive Server is unavailable or does not exist

转载 作者:行者123 更新时间:2023-12-02 09:37:48 25 4
gpt4 key购买 nike

尝试连接远程 SQL Server 时:

$tsql -S localhost -U myuser

我收到如下错误:

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

$tsql -C的输出如下:

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

我已经为远程服务器创建了隧道,例如:

$ssh -L 1433:db_server:1433 user@mid_server

这会将本地端口 1433 转发到 db_server。我测试过。我的 ssh 隧道可以正常工作,因为我可以使用 Navicat(1433 上的 localhost)连接到数据库。我可以在端口 1433 上远程登录本地主机。

最佳答案

我通过修改 freetds.conf 来让它工作

来自

[global]
# TDS protocol version
; tds version = 4.2

[global]
# TDS protocol version
tds version = 7.0

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

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