FreeTDS hangs indefinitely after Microsoft SQL Express 2012 Install

与世无争的帅哥 提交于 2019-12-10 11:07:40

问题


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)

Identical behaviour occurs when I run tsql -S <servername>.

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.

Running tsql -C yields:

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)

Some more information:

I have the folowing SQL-related services running:

  • SQL Full-Text Filter Daemon Launcher (SQLEXPRESS)
  • SQL Server (SQLEXPRESS)
  • SQL Server Browser
  • SQL Server Reporting Services (SQLEXPRESS)
  • SQL Server VSS Writer

I have tried reinstalling FreeTDS.

I have enabled TCP/IP for SQLEXPRESS in the Sql Server Configuration Manager.


回答1:


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.

This is how I fixed the problem:

  1. Open "Sql Server Configuration Manager"
  2. Go to "SQL Server Network Configuration > Protocols for SERVER"
  3. Right click "TCP/IP", select "Properties", go to the "IP Addresses" tab
  4. Under "IPAll" set "TCP Port" to the desired port number
  5. Click OK, and restart the SQL Server service.



来源:https://stackoverflow.com/questions/29310336/freetds-hangs-indefinitely-after-microsoft-sql-express-2012-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!