Friday, February 24, 2012

Installation issue? error: 40 - could not open a connection to SQL Server

Hi,

I am running XP Professional SP2. I have tried to install both SQL 2005 Developer (on this machine) and SQL 2005 Enterprise (on my other laptop), seemingly with success, but get the following error message when I try to connect to the local host using SSMS:

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)

There is obviously something I'm doing fundamentally wrong in the install process - I'd be grateful for any help you guys can offer!

Laura

You might try this,

on the server, using the "Server Configuration Manager" Expand to find the Protocols used for your server.

Now I am only going by my own recent experience which is limited. I am using TCP/IP so if you are, ensure that TCP/IP is enabled.

Then right Click on TCP/IP and on the IP Address Tab make sure it is Active. Then I believe you need to use TCP Port 1433 but make sure you don't put it in the "Dynamic Port" space.

You can check that your server is Listening on this port by going to a command line and typing "netstat -a" no quotes, this should show you a list of which ports it is listening on.. you should then see 1433 as one of them....

If not you need to ask someone smarter than me which shouldn't be hard to find .....

Also, using the SQL Surface area config program, make sure you are using TCP and not just Named Pipes (Whatever they are ?), this is where you wold also ensure that you can allow remote connections or just local connections.

I had this same problem yesterday and this fixed it.

hope this help

|||

Thank you very much for this - however, I already had both TCP/IP and Named pipes enabled.

However, after doing your cmd line thing, it has become apparent that my server is not listening on that port. How do I make it listen, bar the shouting that I'm already doing or do I need to switch the default port to something that the server is listening to?

Many thanks,

Laura

|||On the IP/Tab that I mentioned above, did you specify Port 1433 ?|||Yes.|||

Hi Laura, you mentioned above that you already had IP and Named Pipes enabled.

I just want to verify a couple of things, because there seems to be a few places that these need to be set.... Bear with me if I seem to be covering something we have already covered.

Firstly, using the "SQL Server Configuration Manager" under "Protocols for <you server name>". your TCP/IP is enabled here ?

Secondly, Right click on the word TCP/IP under the protocol Name column and choose Properties.

I will just list the settings I have on my system,

Enabled = Yes

Keep Alive = 30000

Listen All = Yes

No Delay = No

Now go to the "IP Address" Tab on the same window. and here are my settings.

under IP1 Active = Yes

Enabled = Yes

IP Address = <IP of your Server>

TCP Dynamic Ports = <Blank>

TCP Port = 1433

under IP2 Active = Yes

Enabled = Yes

IP Address = <IP of your Server>

TCP Dynamic Ports = <Blank>

TCP Port = 1433

Under IPALL

TCP Dynamic Ports = <Blank>

TCP Port = 1433

Next, using the "SQL Server Surface Area Configuration" program and selecting the link to "Surface Area Configuration for Surface Area Configuration" Expand the "Database Engine" section and ensure that the

"Local and Remote connections" radio button is set on. and that you are using either "TCP/IP and Named Pipes" or just "TCP/IP Only".

Other than that just ensure that each of your SQL Services are running..

Once again. You probably have checked all this already, It's just that one of your posts above mentioned that you had IP enabled and I wanted to make sure that you had everything else set as well.

One other thing I just though about is - ensure that your firewall is allowing the correct traffic through. I am not very knowledgeable about that so maybe someone else can respond on that issue. My Network guru isn't here today.

Also, where I mentioned the TCP Dynamic Ports above. I believe mine were originally set by Default to 0 (Zero),

I actually had to BLANK those out. it seems that if they are 0 (Zero) it wants to take some default port to listen on.

I hope something here helps you...

let me know if not, and we can try to look into something else...

tattoo

|||All that seems to have done the trick - I didn't seem to need to change anything but having gone into it and come out again seems to have done the trick. Goodness only knows what it's problem was...

Many thanks for all your help and support, L
|||

Glad you got it working......

tattoo

|||

hello

Is there anyone to solve my query,as i have gone through the post and tried to solve my connection use,but cold not solve it.

under Sql server configuration Manager in Native Client configuration in Client protocols for TCP/IP i am getting the below

option.and checking my TCP/IP connection through netstat -a.I checked Sql server Area configuration it doesn't show any

error.Even then i am encontering same error.please help me.

Default 1433
Enabled Yes
Keep Alive 30000
Keep Alive Interval 1000

|||

Ranjith, Can you verify that your Dynamic Port field is Blank and NOT Zero

No comments:

Post a Comment