Click here to Skip to main content
15,881,812 members

error: 26 - error locating server/instance specified in sql server 2008

Arunachalam Gurusamy asked:

Open original thread
Hi All,

This is Arun from Chennai. I have developed my first application in WPF (C#) with VS 2008 & SQL Server 2008. It works fine in my system. After deployment, it wont works in other systems. It shows the following error message.

system.data.sqlclient.sqlexception - 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 instance name is correct and sql server is configured to allow remote connections.(provider: sql network interfaces, error: 26 - error locating server/instance specified).

I have gone through the google and done the following steps but no use.

Server Name : ECARE432\SQLEXPRESS
Instance Name : SQLEXPRESS
App.Config have:
<connectionStrings>
<add name="TimeTracker.Properties.Settings.myecareConnectionString" connectionString="Data Source=ECARE432\SQLEXPRESS;Initial Catalog=myecare;Persist Security Info=True;User ID=sa;Password=ecare123@" providerName="System.Data.SqlClient"/>
</connectionStrings>


1. Visual Studio-->Tools-->Options-->Database Tools-->Data Connections-->
Changed "SQL Server Instance Name" from "sqlexpress" to blank.

2. Configuration Tools->SQL Server Configuration Manager->SQL Native Client Configration
Aliases->
Alias Name -> ECARE432\SQLEXPRESS,1433
Port Number -> 1433
Protocol -> TCP/IP
Server Name -> ECARE432\SQLEXPRESS

3. SQL Server Browser is running in my system.

4. Server Name is correct. No typo mismatch.

5. Client machine is able to ping my machine.

6. TCP 1433 and UDP 1434 Exception added to Firewall. Also Turned off the Firewall in both my system and the client system.

Please guide me how to fix this issue.
Tags: SQL Server, SQL Server 2008

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



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