Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-05-2009
Member
 
Join Date: Jan 2009
Posts: 81
Error 40-Could not open a connection

Hi friends,

I am facing an issue while Connection to Sql server whenever i am trying ia m trying to make connection i am getting the following error message

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.
error: 40 - Could not open a connection to SQL Server.


I don't know whats wrong with this can any one provide me solution for it.
Reply With Quote
  #2  
Old 04-05-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Error 40-Could not open a connection

Sure i will help you out with this try to follow the below steps.

Click on Start goto Programs, then Microsoft SQL Server 2005 - - >Configuration Tools- - > SQL Server 2005 Surface Area Configuration - >Surface Area Configuration for Services and connections.

Over here do check whether "Local and remote connections" is chosen or not if not then try to follow the below steps:-
  • First open SQL Server Configuration Manager
  • Now Expand SQL Server 2005 Network Configuration under Configuration Tool.
  • Now select Protocols for and set the Named Pipes To Enabled.
Reply With Quote
  #3  
Old 04-05-2009
Member
 
Join Date: Jan 2009
Posts: 81
Re: Error 40-Could not open a connection

I try to do the above things but still getting Error 40-Could not open a connection message.
Reply With Quote
  #4  
Old 04-05-2009
Member
 
Join Date: Dec 2008
Posts: 128
Re: Error 40-Could not open a connection

I was also getting Error 40 message but i try to do the following things and it worked for me.

Firstly you need to enable the TCP/IP protocol using the Surface Area Configuration Utility.Over here make sure the TCP/IP protocol is enabled in the SQL Server Configuration Utility and also make sure the SQL Server browser is started. Note that this step is optional. It is possible to set the SQL Server instance to use a fixed IP address.Make sure SQL Server and SQL Server Browser are exempted by the firewall on the server machine. This is done by putting sqlservr.exe and sqlbrowser.exe as an exception in the windows firewall.Finally restart your machine and try to connection it again now you won't get Error 40-Could not open a connection error message again.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Error 40-Could not open a connection"
Thread Thread Starter Forum Replies Last Post
VPN Error 5 : No hostname exists for this connection entry. Unable to make VPN connection Xmen Networking & Security 9 14-05-2012 06:05 PM
?Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data? error message in Google Chrome Kolaveri.D Technology & Internet 1 27-02-2012 05:53 PM
HTC Hero shows Error 170 USB connection error Pandeyji Portable Devices 3 23-04-2011 04:35 PM
ExecuteReader requires an open and available Connection. AmolP Software Development 1 03-02-2009 07:08 PM
No network connection and error: Faulting application error on Windows 2000 IreneL Window 2000 Help 2 15-12-2006 07:29 AM


All times are GMT +5.5. The time now is 04:58 AM.