IT Community - Software Programming, Web Development and Technical Support

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

This is a discussion on Installation issue? error: 40 - could not open a connection to SQL Server 2005? within the Server Management forums, part of the Servers and Hosting category; Hi, I am running XP Professional SP2. I have tried to install both SQL 2005 Developer (on this machine) and ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Servers and Hosting > Server Management

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 10-26-2007, 02:12 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi,

I am running XP Professional SP2. I have tried to install both SQL 2005 Developer (on this machine) and SQL 2005 Enterprise 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 am doing fundamentally wrong in the install process ?
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-26-2007, 05:31 AM
satheesh satheesh is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 96
satheesh is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi arjkhanna,

are you 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....

I hope this will help you!



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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 10-29-2007, 04:48 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Re: Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi,

Thank you - 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?
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 10-31-2007, 06:35 AM
satheesh satheesh is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 96
satheesh is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi arjkhanna,

Yes.

specify Port No 1433
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 11-02-2007, 04:54 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi,

Yes. we are useing this Port 1433
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-05-2007, 03:17 AM
satheesh satheesh is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 96
satheesh is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi arjkhanna,

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...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 11-06-2007, 04:54 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi,

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
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 11-12-2007, 04:05 AM
satheesh satheesh is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 96
satheesh is on a distinguished road
Default Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi arjkhanna

you got it working .........
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 11-13-2007, 11:09 PM
shaalini shaalini is offline
D-Web Architect
 
Join Date: Apr 2007
Posts: 633
shaalini is on a distinguished road
Default Re: Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi all,

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 11-16-2007, 04:17 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Re: Installation issue? error: 40 - could not open a connection to SQL Server 2005?

Hi shallani,

Can you verify that your Dynamic Port field is Blank and NOT Zero
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEg Installation in Open suse 11.1 (Linux) sans Server Management 3 05-15-2009 03:32 AM
Error: command line error MIDL1001 : cannot open input file wincodec.idl midl Mramesh C# Programming 0 02-18-2008 10:07 PM
Open Issue vigneshgets Software Testing 2 01-24-2008 02:39 AM
automated installation of Service Pack 2 for SQL Server 2005 arjkhanna Server Management 3 10-30-2007 10:13 AM
SQL 2005 Installation issues Error (0xc0000005). nnraja Server Management 2 10-29-2007 12:05 AM


All times are GMT -7. The time now is 08:09 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0