|
許多初學(xué)者在使用SQL Server時都會遇到使用SQL Server Management Studio無法連接遠(yuǎn)程數(shù)據(jù)庫實(shí)例的問題,大致的錯誤描述如下:
An error has occurred while establishing a connection to the server.
(provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 5)
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 1326)
意思是說不能在數(shù)據(jù)庫之間建立一個連接,原因是命名管道提供者出現(xiàn)錯誤。其實(shí)這是一個比較典型的數(shù)據(jù)庫服務(wù)器設(shè)置問題,在局域網(wǎng)或廣域網(wǎng)中都可能會遇到,我們只需要對數(shù)據(jù)庫服務(wù)器進(jìn)行一些配置便可以解決這個問題,來看看具體的步驟。
確保服務(wù)器端數(shù)據(jù)庫服務(wù)已經(jīng)啟動
開始->所有程序->Microsoft SQL Server 2008->Configutation Tools,打開SQL Server Configuration Manager,點(diǎn)擊SQL Server Services,查看數(shù)據(jù)庫服務(wù)是否已經(jīng)啟動,如果服務(wù)未開啟,手動啟動它。當(dāng)然,你還可以通過點(diǎn)擊Windows中的開始->控制面板->管理者工具->服務(wù),來查看相應(yīng)的數(shù)據(jù)庫服務(wù)是否啟動。或者如果服務(wù)器和你的機(jī)器在同一網(wǎng)絡(luò),你還可以通過命令“sqlcmd -L”(注意L要大寫)去查看該網(wǎng)絡(luò)內(nèi)所有可用的SQL Server服務(wù)器。

it知識庫:解決SQL Server管理器無法連接遠(yuǎn)程數(shù)據(jù)庫的問題,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。