Configure SQLExpress to accept remote connections

在使用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 步骤后仍不能解决问题,可以检查一下防火墙设置,这里就不再多说了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值