Configure SQLExpress to accept remote connections

来源:互联网 发布:淘宝可以办假的身份证 编辑:程序博客网 时间:2024/04/30 08:51
在使用SQL Server Express的时候经常会碰到如下告警:
TITLE: Connect to Server
------------------------------

Cannot connect to ..

------------------------------
ADDITIONAL INFORMATION:

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: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

在这种情况下,可以按以下步骤尝试:

1. [可选] SQL Server Management Studio Express
为了使用方便,可以先到 http://go.microsoft.com/fwlink/?LinkId=65110 去下载一个类似SQL2000的企业管理器的工具(SQL Server Management Studio Express)。

2. 允许TCP/IP
SQL Server Configuration Manager中将Protocols for SQLExpress->TCP/IP设为Enabled

3. [可选] IP Dynamic Ports
SQL Server Configuration ManagerSQL Server Browser服务设为Enabled。同时,为了减少SQLExpress被攻击表面,可将Protocols for SQLExpress->TCP/IP Properties 中的IP Dynamic Ports清空,并设置TCP Port1433(推荐,如果没有SQLServer9.0以下版本;或其它)。

3. [可选] 防火墙
如果在完成1-2-3 步骤后仍不能解决问题,可以检查一下防火墙设置,这里就不再多说了。

原创粉丝点击