Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi,

i am getting this type of problem in sqlserver.
i am using sqlserver 2008,c#.net,vs2008.
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)


any idea or suggestion............

mukesh
Posted
Updated 5-Jan-12 10:24am
v2
Comments
BigDanT 19-Jun-12 9:28am    
Getting the same error in a vb.net application. the interesting point here is that we have multiple people using the same application and only one is getting this error. all other connections are fine. in reading below, is it possible to be a firewall setting, not on the server, but on the desktop? I ran the microsoft portquery application and UDP 1434 was listening so I don't think it's the SQL Express. any thoughts?

Basically this just means that the SQL Server cannot be found. Possible reasons are for example:
- wrong connection string
- firewall blocking the traffic
- correct protocol not enabled
- SQL Server is not running and so on

Try going through this checklist: http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/[^]
 
Share this answer
 
Comments
Espen Harlinn 5-Jan-12 16:31pm    
Good reply :)
Wendelius 5-Jan-12 17:03pm    
Thanks Espen :) Quite good timing, currently surfing on CP and listening to Leave's Eyes[^] and Sirenia[^] :)
Espen Harlinn 5-Jan-12 17:15pm    
How can we explain how appropriate 'Den makalösa manicken' is with regard to modern day angle bracket computing?
http://www.codeproject.com/Messages/4120054/Re-Words-Fail-Me-too.aspx
Wendelius 5-Jan-12 17:42pm    
This was awesome!!! Still thinking about how to explain it but I'd guess I'll have hte answer just after... an eternity :)

BTW just sent you an email via linkedin...
Farhan Bajrai 7-Jan-16 0:54am    
Thank You @Mika Wendelius
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) (.Net SqlClient Data Provider)

If below error comes from Dot Net/SQL wizard, Just change your settings as per below setps:

Step 1: Start->Microsoft SQL Server 2008->


->Configuration Tools->SQL Server Configuration Manager ->SQL Native Client Configration

Step 2: Aliases-> There are three properties

2.1-> Alias Name- > Alias Server like "WSQLCI03\SQLCID05,605" (Synatx Server name,port)
2.2->Port Number ->605 (Note Make Sure Port should not blank)
2.3-> Server Name- >WSQLCI03\SQLCID05

Once above settings are done, surely error will be fixed.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900