[英]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.