An error has occurred while establishing a connection to the server.

Lots of people come across with the following error:

"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.".


The reason for this error is that by default SQL Server allows only local client connection. So to enable it for remote connection you can use SQL Server 2005 Surface Area Configuration application.

Here are the steps:

1. Open SQL Server 2005 Surface Area Configuration.
2. Click on Surface Area Configuration for Services and Connections link.
3. Expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

You will get a message, click on ok and restart the Database Engin service.

Thats it....

No comments: