2011-05-04 119 views
0

我剛在Vista上安裝了SQL Server 2005 SP2,並試圖連接到Management Studio中的對象資源管理器。這樣做時,我得到以下錯誤:無法連接到本地主機SQL Server 2005

Cannot connect to localhost.

A network-related or instance-specific error occurred while establishing a connection to 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

我使用下列憑證:

Server type: Database Engine; Server name: localhost; Authentication: Windows Authentication 

我只是使用SQL Server的本地應用程序。我曾嘗試使用127.0.0.1,我的comp名稱「。」。和localhost。我已經搜索並嘗試了所有我能找到的相關幫助主題。我已重新安裝,打開IIS(只是猜測),更新到最新的服務包,作爲管理員運行等。

我在這裏錯過了什麼?

JJ

回答

0

我不使用快遞。事實證明,我安裝了一個「客戶端」版本的SQL Server。我甚至不知道有客戶端版本。我運行完整安裝並添加了sa用戶,因爲Windows身份驗證不適用於我(下一個目標)。我通過「本地主機」(localhost)連接,所以我不完全明白實例建議是什麼。

基本上解決方案是要安裝完整版本。我的錯。輕鬆修復。

JJ

0

使用(local)

此外,如果有一個實例名稱,你可以嘗試myComputerName\instanceName

0

你錯過實例名稱嘗試。你不只是連接到localhost,但有下列情形的(假設你的機器被稱爲dago和您的實例sqlexpress):

localhost\sqlexpress 
dago\sqlexpress 
.\sqlexpress 
+0

並非每個sql服務器實例都是一個命名實例。對於默認實例,您不使用您所指的語法。 – 2011-05-05 22:26:19

+0

現在我記得。 (目前不能訪問Express以外的版本。)謝謝! – Lumi 2011-05-05 22:40:28

相關問題