問題描述
當我嘗試連接到服務器時,FreeTDS 無限期掛起:
FreeTDS hangs indefinitely when I try to connect to a server:
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
時出現相同的行為.
Identical behaviour occurs when I run tsql -S <servername>
.
我最近卸載了 Microsoft SQL Server Management Studio,然后安裝了 Express 版.與 tsql -H localhost -p 1433
的連接在卸載/安裝之前工作.
I recently uninstalled Microsoft SQL Server Management Studio, and then installed the Express edition. Connection with tsql -H localhost -p 1433
worked before the 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 相關服務:
I have the folowing SQL-related services running:
- SQL 全文過濾器守護程序啟動器 (SQLEXPRESS)
- SQL Server (SQLEXPRESS)
- SQL Server 瀏覽器
- SQL Server 報告服務 (SQLEXPRESS)
- SQL Server VSS 編寫器
我嘗試重新安裝 FreeTDS.
I have tried reinstalling FreeTDS.
我在 SQL Server 配置管理器中為 SQLEXPRESS 啟用了 TCP/IP.
I have enabled TCP/IP for SQLEXPRESS in the Sql Server Configuration Manager.
推薦答案
tsql
命令掛起,因為服務器沒有在默認端口上運行.我通過運行 C:\>netstat -na | 發現了這一點.找到1433"
,它在端口 1433 上沒有顯示正在偵聽.
The tsql
command was hanging because the server was not running on the default port. I found this out by running C:\>netstat -na | find "1433"
, which showed nothing LISTENING on port 1433.
我是這樣解決問題的:
- 打開Sql Server 配置管理器"
- 轉到SQL Server 網絡配置 > SERVER 的協議"
- 右鍵單擊TCP/IP",選擇屬性",轉到IP 地址"選項卡
- 在IPAll"下將TCP Port"設置為所需的端口號
- 單擊確定",然后重新啟動 SQL Server 服務.
這篇關于安裝 Microsoft SQL Express 2012 后,FreeTDS 無限期掛起的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!