Mental Jetsam

By Peter Finch

Problem Connecting to SQL Server over TCP/IP

Posted by pcfinch on October 23, 2007

After installing SQL Server Express 2005 I was not able to connect to it using Visual Studio Server Explorer but I was able to connect to the database server using the SQL Server Management Studio Express. Visual Studio was giving me the following error.

An error has occurred while establishing a connection to the server. When connecting to the SQL server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connection. (Provider: TCP Provider, error : 0 – No connection could be made because the target machine actively refused it.)

Configure SQL Server TCP/IP PortI had already used the SQL Server Surface Area Configuration to enable TCP/IP, the Management Studio to Enable both Windows and SQL Server Authentication modes and I had even enabled port 1433 on the windows firewall, but still I could not connect.

I found that the port settings in the “TCP/IP Properties – IP Address” dialog of the “SQL Server Configuration Manager” were actually blank. I had to enter port 1433 manually into each of the “TCP Port” fields and after restarting the SQL Server service everything worked fine.

Advertisements

One Response to “Problem Connecting to SQL Server over TCP/IP”

  1. Lee said

    Thank you so much! This worked for me!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: