Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL-Server
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 5-Jan-12 8:15am
Edited 5-Jan-12 11:24am
Mehdi Gholam253.5K
v2
Comments
BigDanT at 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?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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/[^]
  Permalink  
Comments
Espen Harlinn at 5-Jan-12 16:31pm
   
Good reply :)
Mika Wendelius at 5-Jan-12 17:03pm
   
Thanks Espen :) Quite good timing, currently surfing on CP and listening to Leave's Eyes[^] and Sirenia[^] :)
Espen Harlinn at 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
Mika Wendelius at 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...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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.
  Permalink  
v2

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100