SQL 服务器 ODBC "TCP Provider: Error code 0x274C"

SQL Server ODBC "TCP Provider: Error code 0x274C"

我从 SQL 服务器的 ODBC 驱动程序 17 收到以下错误:

[08S01] [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x274C (10060) (SQLExecDirectW)

我可以从 this documentation 的 ODBC 的 SQLSTATE 值得知 08S01 表示问题是“通信 link 失败”,但我我无法找到指示 TCP Provider: Error code 0x274C 含义的文档,因此我不知道这是否提供了有关失败的更多具体信息。

0x274C 错误代码是什么意思?

Error code 0x274C (10060)

Explanation

The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections.

我遇到了同样的连接问题。我能够使用 DB Weaver 连接到远程 MSSQL 服务器,但在尝试使用文件连接时遇到问题。如果您使用多个 php 版本,请删除所有不需要的版本。

sudo apt-get purge php5.*
sudo apt-get purge php5.6  #specific version

重启apache2或nginix服务器php sudo service php7.4-fpm restart