当我尝试连接到服务器时,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,然后安装了 Express 版本。连接 tsql -H localhost -p 1433
在卸载/安装之前有效。
正在运行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 相关的服务:
- SQL 全文过滤器守护进程启动程序 (SQLEXPRESS)
- SQL Server (SQLEXPRESS)
- SQL Server 浏览器
- SQL Server 报告服务 (SQLEXPRESS)
- SQL Server VSS 编写器
我已尝试重新安装 FreeTDS。
我已在 Sql Server 配置管理器中为 SQLEXPRESS 启用 TCP/IP。
最佳答案
tsql
命令挂起,因为服务器未在默认端口上运行。我通过运行 C:\>netstat -na | 发现了这一点找到“1433”
,它在端口 1433 上没有显示任何“LISTENING”。
这就是我解决问题的方法:
- 打开“Sql Server 配置管理器”
- 转到“SQL Server 网络配置 >SERVER 协议(protocol)”
- 右键点击“TCP/IP”,选择“属性”,转到“IP 地址”选项卡
- 在“IPAll”下将“TCP Port”设置为所需的端口号
- 单击“确定”,然后重新启动 SQL Server 服务。
关于sql-server - 安装 Microsoft SQL Express 2012 后 FreeTDS 无限期挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29310336/