gpt4 book ai didi

tsql - 错误 20012(严重性 2):Server name not found in configuration files

转载 作者:行者123 更新时间:2023-12-04 13:00:09 33 4
gpt4 key购买 nike

这是我的代码详细信息

Step 1.
/etc/freetds/freettds.conf
[mssql]
host = 192.168.1.10
port = 1433
tds version =8.0
client charset = UTF-8

Step 2
/etc/odbcinst.ini
[FreeTDS]
Description = FreeTDS
Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
Step 3
/etc/odbc.ini
[mssqltest]
Description = MS SQL connection to mssqltest database
Driver = FreeTDS
Database = cakephp_results
Server = mssql
UserName = sa
Password = sa
Trace = Yes
Port = 1433

我尝试使用以下命令通过命令行连接 sql:
$ tsql -S mssqltest -U sa -P sa
Error 20012 (severity 2):
Server name not found in configuration files.
locale is "en_IN"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20013 (severity 2):
Unknown host machine name.
There was a problem connecting to the server

最佳答案

您应该复制 /etc/freetds.conf到您的主文件夹,其名称前带有点,如下所示:

cp /etc/freetds.conf ~/.freetds.conf

看起来它搜索每个用户的配置,我最近遇到了同样的问题。

关于tsql - 错误 20012(严重性 2):Server name not found in configuration files,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17064066/

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