為SQL Server Express 2012啟用遠端連線 - Enable remote connections for SQL Server Express 2012

語言: CN / TW / HK

問題:

I just installed SQL Server Express 2012 on my home server. 我剛剛在家庭伺服器上安裝了SQL Server Express 2012。 I'm trying to connect to it from Visual Studio 2012 from my desktop PC, and repeatedly getting the well-known error: 我試圖通過桌上型電腦從Visual Studio 2012連線到它,並反覆得到眾所周知的錯誤:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立與SQL Server的連線時發生與網路相關或特定於例項的錯誤。 The server was not found or was not accessible. 伺服器未找到或無法訪問。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 驗證例項名稱正確,並且已將SQL Server配置為允許遠端連線。 (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (提供者:命名管道提供程式,錯誤:40-無法開啟與SQL Server的連線)

What I've done to try to fix this: 我已嘗試解決此問題:

  • Run SQL Server Configuration Manager on the server and enable SQL Server Browser 在伺服器上執行SQL Server配置管理器並啟用SQL Server瀏覽器
  • Add a Windows Firewall exception on the server for TCP, ports 1433 and 1434 on the local subnet. 在伺服器上為本地子網上的TCP,埠1433和1434新增Windows防火牆例外。
  • Verify that I have a login on the SQL Server instance for the user I'm logged in as on the desktop. 驗證我在SQL Server例項上是否具有我在臺式機上登入的使用者的登入名。
  • Verify that I'm using Windows Authentication on the SQL Server instance. 驗證我在SQL Server例項上使用Windows身份驗證。
  • Repeatedly restart SQL Server and the whole dang server. 反覆重新啟動SQL Server和整個dang伺服器。
  • Pull all my hair out. 拉我所有的頭髮。

How can I get SQL Server 2012 Express to allow remote connections!? 如何獲得SQL Server 2012 Express以允許遠端連線!?


解決方案:

參考一: https://stackoom.com/question/lJx4
參考二: Enable remote connections for SQL Server Express 2012
「其他文章」