SQL Server 2005 – Named Pipes Provider, Error 40

Written by Cornelius J. van Dyk on . Posted in Blog

If you have SQL Server 2005 Express installed and you attempt to add a DataSource connection to a Visual Studio project, you may encounter 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. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

To fix this, follow these steps:

  1. Start by launching the SQL Server Configuration Manager.

  2. It can usually be found under the Microsoft SQL Server 2005/Configuration Tools/SQL Server Configuration Manager path. You will be presented with the SQL Server Configuration Manager control panel.

  3. Expand the “SQL Server 2005 Network Configuration” option.
  4. Select the “Protocols for <YOUR_SERVER_NAME_HERE>”.
  5. In the right hand pane, there should be several options, one of which is “Named Pipes” and by default it should have a “Disabled” status.
  6. Right click the “Named Pipes” option.
  7. On the dropdown menu, select “Enable”.
  8. You will receive a popup warning stating that the SQL service would have to be restarted in order for changes to take effect.

  9. Click “OK”.
  10. The “Named Pipes” option will now show “Enabled”, but we still have to restart the service to take effect.

  11. Now select the “SQL Server 2005 Services” option in the left hand panel.

  12. In the right hand panel, the “SQL Server (<YOUR_SERVER_NAME_HERE>)” option should be visible.
  13. It’s state should be “Running”.
  14. Select the blue arrow on the button bar, indicated above.
  15. When you hover over this button, the context help should state “Restart service”.
  16. Click this button to restart your SQL service and commit your changes.
  17. The service will be stopped and restarted.



Cheers
C




image

Tags: ,

Trackback from your site.

Cornelius J. van Dyk

Born and raised in South Africa during the 70's I got my start in computers when a game on my Sinclair ZX Spectrum crashed, revealing it's BASIC source code. The ZX had a whopping 48K of memory which was considered to be a lot in the Commodore Vic20 era, but more importantly, it had BASIC built into the soft touch keyboard. Teaching myself to program, I coded my first commercial program at age 15.

After graduating high school at 17, I joined the South African Air Force, graduating the Academy and becoming a Pilot with the rank of First Lieutenant by age 20. After serving my country for six years, I made my way back into computer software.

Continuing my education, I graduated Suma Cum Laude from the Computer Training Institute before joining First National Bank where my work won the Smithsonian Award for Technological Innovation in the field of Banking and Insurance. Soon I met Will Coleman from Amdahl SA, who introduced me to a little known programming language named Huron/ObjectStar. As fate would have it, this unknown language and Y2K brought me to the USA in 1998.

I got involved with SharePoint after playing around with the Beta for SharePoint Portal Server 2003. Leaving my career at Rexnord to become a consultant in 2004, I was first awarded the Microsoft Most Valuable Professional Award for SharePoint in 2005, becoming only the 9th MVP for WSS at the time. I fulfilled a life long dream by pledging allegiance to the Flag as a US citizen in 2006. I met the love of my life and became a private consultant in 2008. I was honored to receive my ninth MVP award for SharePoint Server in 2013.

Leave a comment

You must be logged in to post a comment.