Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


A network-related or instance-specific error occurred while establishing a connection to SQL Server


A network-related or instance-specific error occurred while establishing a connection to SQL Server

Author
Message
gary1
gary1
Right there with Babe
Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)Right there with Babe (730 reputation)

Group: General Forum Members
Points: 730 Visits: 2246
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?
CapnHector
CapnHector
SSC Eights!
SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)SSC Eights! (917 reputation)

Group: General Forum Members
Points: 917 Visits: 1789
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
mulebhaskarareddy
mulebhaskarareddy
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 12
hi

need to enble tcp/ip
dan-572483
dan-572483
SSChasing Mays
SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)

Group: General Forum Members
Points: 649 Visits: 1958
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).
mulebhaskarareddy
mulebhaskarareddy
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 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
mulebhaskarareddy
mulebhaskarareddy
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 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
Patrick Hill-489170
Patrick Hill-489170
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
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?
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16679 Visits: 17036
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)
Patrick Hill-489170
Patrick Hill-489170
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
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=****;
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16679 Visits: 17036
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)
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