Microsoft SQL Express 2012 安装后 FreeTDS 无限期挂起

FreeTDS hangs indefinitely after Microsoft SQL Express 2012 Install

当我尝试连接到服务器时,FreeTDS 无限期挂起:

C:\FreeTDS\bin>tsql -H localhost -p 1433
locale is "English_United States.1252"
locale charset is "CP1252"
using default charset "CP1252"

(nothing else is displayed, can only exit with ^C)

当我 运行 tsql -S <servername>.

时会发生相同的行为

我最近卸载了 Microsoft SQL Server Management Studio,然后安装了速成版。与 tsql -H localhost -p 1433 的连接在 uninstall/install.

之前有效

运行 tsql -C 产量:

Compile-time settings (established with the "configure" script)
                        Version: freetds v0.91.98
         freetds.conf directory: /mingw/etc
 MS db-lib source compatibility: no
    Sybase binary compatibility: no
                  Thread safety: yes
                  iconv library: yes
                    TDS version: 7.0
                          iODBC: no
                       unixodbc: yes
          SSPI "trusted" logins: yes
                       Kerberos: yes (Heimdal 1.5.3)
                 SSL encryption: yes (OpenSSL 1.0.1e)

更多信息:

我有以下 SQL 相关服务 运行ning:

我已经尝试重新安装 FreeTDS。

我在 Sql 服务器配置管理器中为 SQLEXPRESS 启用了 TCP/IP。

tsql 命令挂起,因为服务器不在 运行 默认端口上。我通过 运行 C:\>netstat -na | find "1433" 发现了这一点,它在端口 1433 上没有任何监听。

我是这样解决问题的:

  1. 打开"Sql Server Configuration Manager"
  2. 转到"SQL Server Network Configuration > Protocols for SERVER"
  3. 右键单击 "TCP/IP"、select "Properties",转到 "IP Addresses" 选项卡
  4. 在 "IPAll" 下将 "TCP Port" 设置为所需的端口号
  5. 单击“确定”,然后重新启动 SQL 服务器服务。