SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
shanejames
shanejames
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 Visits: 29
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!!!



Jayanth_Kurup
Jayanth_Kurup
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8853 Visits: 1351
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
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61172 Visits: 9400
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/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.
Nice Marmot
Nice Marmot
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1027 Visits: 770
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
shoffman-569213
shoffman-569213
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 228
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.
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61172 Visits: 9400
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/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.
SanDroid
SanDroid
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3346 Visits: 1046
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.
Cool
shoffman-569213
shoffman-569213
SSC Veteran
SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)SSC Veteran (247 reputation)

Group: General Forum Members
Points: 247 Visits: 228
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!!!
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61172 Visits: 9400
Glad you found your issue and thanks for posting the details about it.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/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.
AEdel
AEdel
Valued Member
Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)

Group: General Forum Members
Points: 54 Visits: 14
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...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search