“SQL Server does not allow remote connections”错误的解决
生活随笔
收集整理的這篇文章主要介紹了
“SQL Server does not allow remote connections”错误的解决
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
安裝DNN 4.8的時候出現(xiàn)這個錯誤
Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 53
Message: 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)
因為對于SQL Server 2005 Express Edition 和 SQL Server 2005 Developer Edition 默認(rèn)的設(shè)置是不允許 remote connections 的,參考MSDN的文檔可以更改設(shè)置:http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
我的機(jī)器上安裝了SQL 2000 的Personal版本和SQL 2005 Express(隨VS自動安裝的),我使用的是SQL 2000的Personal版本,應(yīng)該不存在這個問題。在研究一番之后找到了答案。
在沒有安裝SQL 2005 Express之前,我的機(jī)器上只有一個SQL Server,我一般在連接字符串里使用local來指明使用本地的SQL 2000 Personal 版本。安裝Express版后,機(jī)器上會存在兩個SQL 的實例。如圖:
一個是LAND001(我的計算機(jī)名),一個是LAND001\SQLEXPRESS。這個時候,如果還是用local來指代SQL Server Personal版本,DNN安裝是不會找Personal版,而是找到 Express版。
解決辦法,連接字符串中使用SQL的實例名準(zhǔn)確指定要使用的SQL Server,比如LAND001。
Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 53
Message: 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)
因為對于SQL Server 2005 Express Edition 和 SQL Server 2005 Developer Edition 默認(rèn)的設(shè)置是不允許 remote connections 的,參考MSDN的文檔可以更改設(shè)置:http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
我的機(jī)器上安裝了SQL 2000 的Personal版本和SQL 2005 Express(隨VS自動安裝的),我使用的是SQL 2000的Personal版本,應(yīng)該不存在這個問題。在研究一番之后找到了答案。
在沒有安裝SQL 2005 Express之前,我的機(jī)器上只有一個SQL Server,我一般在連接字符串里使用local來指明使用本地的SQL 2000 Personal 版本。安裝Express版后,機(jī)器上會存在兩個SQL 的實例。如圖:
一個是LAND001(我的計算機(jī)名),一個是LAND001\SQLEXPRESS。這個時候,如果還是用local來指代SQL Server Personal版本,DNN安裝是不會找Personal版,而是找到 Express版。
解決辦法,連接字符串中使用SQL的實例名準(zhǔn)確指定要使用的SQL Server,比如LAND001。
轉(zhuǎn)載于:https://www.cnblogs.com/DotNetNuke/archive/2008/06/08/1215913.html
總結(jié)
以上是生活随笔為你收集整理的“SQL Server does not allow remote connections”错误的解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux cat 命令详解
- 下一篇: 不敢想你