简体   繁体   English

错误 20009(严重性 9):无法连接:Adaptive Server 不可用或不存在操作系统错误 111,“连接被拒绝”

[英]Error 20009 (severity 9): Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection refused"

I tried to connect to MSSQl database using freetds, unixODBC in raspberry pi 4.Below are my settings.我尝试在树莓派 4 中使用 freetds、unixODBC 连接到 MSSQl 数据库。下面是我的设置。

[fred]
  host = 109.*.*.*    # Remote Sql Server's IP addr
  port = 1433         # this is default
  tds version = 7.4     # this is by the time i post this
  client charset =UTF-8

[test]
Driver = FreeTDS
Description = MSSQL Server
Trace = No
Server = fred      # IP or host name of the Sql Server
Port = 1433           # This is default
TDS_Version = 7.4

[FreeTDS]
Description=FreeTDS Driver
Driver=/usr/lib/arm-linux-gnueabihf/odbc/libtdsodbc.so
Setup=/usr/lib/arm-linux-gnueabihf/odbc/libtdsS.so
UsageCount=1

I have tested with tsql -H ip -U username -P password but the error still persists.我已经用 tsql -H ip -U 用户名 -P 密码进行了测试,但错误仍然存在。 I have also installed pyodbc.我还安装了 pyodbc。 I am trying to connect from Pi to MS SQl Server Management studio.我正在尝试从 Pi 连接到 MS SQl Server Management studio。 Could anyone suggest me to have a successful connection to database?谁能建议我成功连接到数据库? I appreciate all the approaches.我感谢所有的方法。

I was able to shrug off this error by using the following call:通过使用以下调用,我能够摆脱这个错误:

bsqldb -S $servername:1433 -D $databasename -U $username -P $password -i $inputfile

As far as documentation states, a qualified server name with the port number allows to bypass the related.conf settings.就文档状态而言,带有端口号的限定服务器名称允许绕过 related.conf 设置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误 20009(严重性 9):无法连接:Adaptive Server 不可用或不存在 操作系统错误 111,“连接被拒绝” - Error 20009 (severity 9):Unable to connect: Adaptive Server is unavailable or does not exist OS error 111, "Connection refused" SQLSTATE [HY000]无法连接:Adaptive Server不可用或不存在(严重性9)Laravel - SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9) Laravel 无法连接:Adaptive Server不可用或不存在 - Unable to connect: Adaptive Server is unavailable or does not exist sybase_connect()错误 - “无法连接:Adaptive Server不可用或不存在” - sybase_connect() Error - “Unable to connect: Adaptive Server is unavailable or does not exist” 一般错误:20003 Adaptive Server 连接超时 [20003](严重性 6) - General error: 20003 Adaptive Server connection timed out [20003] (severity 6) 从 PHP 连接到 SQL Server 时出现“Adaptive Server 不可用或不存在”错误 - "Adaptive Server is unavailable or does not exist" error connecting to SQL Server from PHP TinyTds-自适应服务器不可用或不存在 - TinyTds - Adaptive server is unavailable or does not exist pymssql.OperationalError:DB-Lib 错误消息 20009,严重性 9 - pymssql.OperationalError: DB-Lib error message 20009, severity 9 Airflow:2.3.0:MsSqlConnect:Adaptive Server 不可用或不存在 - Airflow:2.3.0:MsSqlConnect:Adaptive Server is unavailable or does not exist SQLSTATE[01002] Adaptive Server 连接失败(严重性 9) - SQLSTATE[01002] Adaptive Server connection failed (severity 9)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM