Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

A network-related or instance-specific error occurred while establishing a connection to SQL Server Expand / Collapse
Author
Message
Posted Monday, March 19, 2012 12:39 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, October 30, 2013 6:42 PM
Points: 667, Visits: 2,055
Hi,

The below error is logged into application logs intermittently.But, when I review SQL Server errorlog, event viewer application log, system log on sql server side, there are no errors or warnings at the time the application is getting the error

Exception: A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


Please advise how to diagnose this error?
Post #1269164
Posted Monday, March 19, 2012 12:55 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, July 20, 2014 7:16 AM
Points: 945, Visits: 1,769
when you say its intermittent, is that from the same machine to the same server sometimes it will connect sometimes it wont and nothing changes in the server or app configuration? If thats the case i would guess there is a network issue. when it happens you can try to ping the server hosting the SQL instance and if the ping times out we have our culprit.


For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden for the best way to ask your question.

For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw

Need to Split some strings? Jeff Moden's DelimitedSplit8K
Jeff Moden's Cross tab and Pivots Part 1
Jeff Moden's Cross tab and Pivots Part 2

Jeremy Oursler
Post #1269170
Posted Monday, June 4, 2012 5:28 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 6, 2013 3:38 AM
Points: 12, Visits: 12
hi

need to enble tcp/ip
Post #1310403
Posted Monday, June 4, 2012 8:08 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 4:19 PM
Points: 529, Visits: 1,570
Last year our application was throwing this error when we knew for a fact the SQL server WAS up & online. We eventually traced it to a configuration in the application for a different SQL instance which no longer existed. Though we didn't use the feature the configuration was for, we had tested it, and it turned out that if the connection string is filled out the application did test the connection.

Look through the apps configuration area, config files if they exist and registry. Look for the string "ConnectionString."

This troubleshooting would be easier if Microsoft included the name if the instance it is unable to connect to in this error (hint hint).
Post #1310497
Posted Monday, June 4, 2012 8:53 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 6, 2013 3:38 AM
Points: 12, Visits: 12
hi

the simple we have do is to enable the tcp /ip property in configuration

http://www.aspdotnet-sharepoint.com/2012/04/network-related-or-instance-specific.html
Post #1310913
Posted Monday, July 2, 2012 1:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 6, 2013 3:38 AM
Points: 12, Visits: 12
hi

we need enable tcp/ip property in sql server configuration manager

please refer this link
http://www.aspdotnet-sharepoint.com/2012/04/network-related-or-instance-specific.html

thanks,
bhaskar
Post #1323655
Posted Wednesday, January 16, 2013 1:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 19, 2013 6:45 AM
Points: 7, Visits: 29
I know this is an old thread but figured I would post here instead of creating a new one. I too am having this issue. The odd thing is I get the error when I try to connect to the SQL Server using .NET code( VB.NET or C#). However, I tried using VB6 and it connects to the DB just fine and pulls the data(using the EXACT same connection string).

Remote connections is enabled, TCP/IP and naming pipes are enabled, I added both the TCP port 1433 and UDP port 1434 enabled in windows firewall and remote connections is enabled, I'm able to ping the IP of the server as well. I just find it really really odd that I can connect via a VB6 app but not a .NET app. Does anyone have any other ideas what I can try?

Post #1408069
Posted Wednesday, January 16, 2013 2:50 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 13,139, Visits: 11,980
Patrick Hill-489170 (1/16/2013)
I know this is an old thread but figured I would post here instead of creating a new one. I too am having this issue. The odd thing is I get the error when I try to connect to the SQL Server using .NET code( VB.NET or C#). However, I tried using VB6 and it connects to the DB just fine and pulls the data(using the EXACT same connection string).

Remote connections is enabled, TCP/IP and naming pipes are enabled, I added both the TCP port 1433 and UDP port 1434 enabled in windows firewall and remote connections is enabled, I'm able to ping the IP of the server as well. I just find it really really odd that I can connect via a VB6 app but not a .NET app. Does anyone have any other ideas what I can try?



Using the EXACT same string in VB6 and .NET is probably the issue. It is very likely you don't want the same string because it is likely you are not making the same type of connection. Check out http://www.connectionstrings.com/


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1408087
Posted Thursday, January 17, 2013 6:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 19, 2013 6:45 AM
Points: 7, Visits: 29
Sean Lange (1/16/2013)
Patrick Hill-489170 (1/16/2013)
I know this is an old thread but figured I would post here instead of creating a new one. I too am having this issue. The odd thing is I get the error when I try to connect to the SQL Server using .NET code( VB.NET or C#). However, I tried using VB6 and it connects to the DB just fine and pulls the data(using the EXACT same connection string).

Remote connections is enabled, TCP/IP and naming pipes are enabled, I added both the TCP port 1433 and UDP port 1434 enabled in windows firewall and remote connections is enabled, I'm able to ping the IP of the server as well. I just find it really really odd that I can connect via a VB6 app but not a .NET app. Does anyone have any other ideas what I can try?



Using the EXACT same string in VB6 and .NET is probably the issue. It is very likely you don't want the same string because it is likely you are not making the same type of connection. Check out http://www.connectionstrings.com/


I checked connectionstrings.com this is the connection string I'm using:

Server=Servername\InstanceName;Database=FireSaftey_Test;User Id=fs_admin;
Password=****;
Post #1408380
Posted Thursday, January 17, 2013 8:27 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 13,139, Visits: 11,980
Patrick Hill-489170 (1/17/2013)
Sean Lange (1/16/2013)
Patrick Hill-489170 (1/16/2013)
I know this is an old thread but figured I would post here instead of creating a new one. I too am having this issue. The odd thing is I get the error when I try to connect to the SQL Server using .NET code( VB.NET or C#). However, I tried using VB6 and it connects to the DB just fine and pulls the data(using the EXACT same connection string).

Remote connections is enabled, TCP/IP and naming pipes are enabled, I added both the TCP port 1433 and UDP port 1434 enabled in windows firewall and remote connections is enabled, I'm able to ping the IP of the server as well. I just find it really really odd that I can connect via a VB6 app but not a .NET app. Does anyone have any other ideas what I can try?



Using the EXACT same string in VB6 and .NET is probably the issue. It is very likely you don't want the same string because it is likely you are not making the same type of connection. Check out http://www.connectionstrings.com/


I checked connectionstrings.com this is the connection string I'm using:

Server=Servername\InstanceName;Database=FireSaftey_Test;User Id=fs_admin;
Password=****;


So you said you can't connect. What is the actual message?


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1408462
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse