如何解决sql server2005的“不允许远程连接”错误.(how to resolve the error: "SQL Server does not allow remote connections" for SQL Server2005)

There are several reasons for this error. (the step 1 and 2 come from other's article.)

mostly, only it will be ok after step 1 and 3 done.

1. Enable Remote Connection

If you are using SQL Server 2005 Express or SQL Server Developer editions, you have to enable Remote connection on. By default, SQL Server 2005 express, developer and evaluation editions allow local client connections only.

            You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:

         i. Click Start->Programs->Microsoft SQL Server 2005->Configuration Tools->SQL Server Surface Area Configuration.


        ii. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.


       iii. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

      iv. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service to effect the above change.

2. Enable SQL Server Browser Service

If you are running SQL Server 2005 by using an instance name and you are not using a specific TCP/IP port number in your connection string, you must enable the SQL Server Browser service to allow for remote connections. For example, SQL Server 2005 Express is installed with a default instance name of Computer Name/SQLEXPRESS. You are only required to enable the SQL Server Browser service one time, regardless of how many instances of SQL Server 2005 you are running. To enable the SQL Server Browser service, follow these steps.

        i.  Click Start->Programs->Microsoft SQL Server 2005->Configuration Tools->SQL Server Surface Area Configuration.


      ii. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.


     iii. On the Surface Area Configuration for Services and Connections page, click SQL Server Browser, click Automatic for Startup type, and then click Apply.

    iv. Click Start, and then click OK.

 

    all these please refer to the picture: https://p-blog.csdn.net/images/p_blog_csdn_net/footpath/EntryImages/20081218/1.GIF

 

3. Set the sql server properties.

    i.  Click Start->Programs->Microsoft SQL Server 2005->SQL Server Management Studio

    ii. Connect to the server.

    iii. Right click the connection, selecct "Properties".

    iv. Select "connections" in the "select a page" panel.

    v.  Check the CheckBox "All remote connections to this server".

    vi. Click OK.

please refer to the picure: https://p-blog.csdn.net/images/p_blog_csdn_net/footpath/EntryImages/20081218/2.GIF

 

 

After every step is done, please restart the sql server service.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值