Named Pipes Provider: Could not open a connection to SQL Server [53]

  • I am running SQL Server 2005 - 9.00.3042.00 On a Windows 2003 server service pack 2. I have a VB application that has been running for 2 years and connecting fine to the database. Suddenly the application generates an error when connecting to the server/DB (Named Pipes Provider: Could not open a connection to SQL Server [53]) . The error also occurs when opening visual studio 2010 and trying to run queries or stored procedures. I am trying to figure out what changed. It is a named instance, sql browser service is running, named pipes and tcp and shared memory are enabled. Allow remote connections is also turned on. Something has changed and I am trying to find out what?? The network admin said the firewall has been disabled on the server in question. It is configured using dynamic ports. I was able to connect from a client machine using sqlcmd using trusted connection and I ran a query from the DB. Any help is appreciated.

    Thanks in advance!!!

  • Are u able to ping the server , could u try creating a file with .udl extn and see if your able to connect using sal native client.I would double check the firewalls , try running a tracert . Are other servers accessible ?

    Check the connect timeout settings.

    Jayanth Kurup[/url]

  • Check the Configuration Manager for SQL Server. Someone may have turned off Named Pipes as a protocol.

    EDIT: Also, check the box that the application is running on. Did someone turn off Named Pipes at the source?

    It might be a good idea to run a network sniffer from the application server to see where all the traffic goes.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Does the application run on the same host as the database server? If the application is on a different host, try connecting from a client using the application's connection string, e.g. "sqlcmd -S np:\\myhost\pipe\mssql$myinstance\sql\query -U myuser".

    Try connecting on the database server using the connection string as well as a connection string without the computername, e.g. "sqlcmd -S np:\\.\pipe\mssql$myinstance\sql\query -U myuser".

    If you can connect on the sql server host with . (dot) as the computername, it implies that the computername is not resolving from the remote host. Possibly the IP address, hostname, or FQDN has changed in some way.

    HTH

  • Firstly thanks for all the replies. I verified settings and everything looks good. We verified the firewall is turned off and the ports are not blocked. I successfully connected from my desktop to the instance on the server using sqlcmd -S np:\\host\pipe\mssql$instance\sql\query -E (we are connecting using Integrated Security). I also tried the same command on the server using the dot and it worked fine??? So I was able to connect using np from sqlcmd but the developer still cannot connect using this Visual Basic 2010 Studio, we still get the named pipes error??? I also restarted the SQL Browser service. We only have named instances on this box.

  • Have you had any service pack updates or anything applied to your box or the server recently? Right about the same time that this error started.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • What is the connection string being used?

    Does this only happen on the VS 2010 system?

    Can he connect to the Application database using the Server Explorer in VS 2010?

    Does the VS 2010 system have MDAC 2.8 or better and SQL 10 Native SQL drivers installed?

    My guess is what changed in your VB.NET app was the version of Visual Studio. If the app is over two years in production it could not have been created with VS 2010 originaly.

    😎

  • OK we seem to have found the issue. A consultant had some synonyms in a DB that was pointing to a server that no longer existed. Once we changed the server name in the synonyms now the connection works fine. What is odd the synonyms are at a DB level and we also tried a different DB and it failed when the synonyms in the other DB pointed to the wrong server. Now all the connections work since the synonym server name has been corrected!!!

    Thanks to everyone who provided help on this subject!!!

  • Glad you found your issue and thanks for posting the details about it.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • We began getting the following error this morning, from a php script that's been running for months:

    [25-Feb-2013 01:10:17] PHP Warning: odbc_connect(): SQL error: [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53]. , SQL state 08001 in SQLConnect in C:\Admin\Scripts\extract_to_sqlserver.php on line 665

    The script connects to the local host, and was using the IP address "192.168.0.40". When we changed it to "localhost", it started working again.

    Now, to figure out what changed in the environment that caused the IP to stop working all of a sudden...

  • AEdel (2/25/2013)


    We began getting the following error this morning, from a php script that's been running for months:

    [25-Feb-2013 01:10:17] PHP Warning: odbc_connect(): SQL error: [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53]. , SQL state 08001 in SQLConnect in C:\Admin\Scripts\extract_to_sqlserver.php on line 665

    The script connects to the local host, and was using the IP address "192.168.0.40". When we changed it to "localhost", it started working again.

    Now, to figure out what changed in the environment that caused the IP to stop working all of a sudden...

    Maybe your localhost lost its DHCP lease?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin (2/26/2013)


    AEdel (2/25/2013)


    We began getting the following error this morning, from a php script that's been running for months:

    [25-Feb-2013 01:10:17] PHP Warning: odbc_connect(): SQL error: [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53]. , SQL state 08001 in SQLConnect in C:\Admin\Scripts\extract_to_sqlserver.php on line 665

    The script connects to the local host, and was using the IP address "192.168.0.40". When we changed it to "localhost", it started working again.

    Now, to figure out what changed in the environment that caused the IP to stop working all of a sudden...

    Maybe your localhost lost its DHCP lease?

    Our IT dept. rebooted the server, and it resolved whatever the problem was... since this is a database server, it's configured to use a static IP.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply