Last post Apr 25, 2016 10:05 AM by JohnsonWelch
Dec 02, 2009 12:21 AM|kutting|LINK
If you are facing problem with connecting to SQL Server through ur application. And getting following error
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces,
error: 26 - Error Locating Server/Instance Specified)"
Check if you can login to your SQL Server Managed Studio using ur user Name and pwd.
Example using ur sa account which is ur default account
If not the then follow following steps
Change the authentication mode to mixed from Windows, Following are the steps to be followed.
In SQL Server Management Studio Object Explorer, right-click the server, and then click
On the Security page, under Server authentication, select the new server authentication mode "SQL Server and Windows Authentication mode", and then click
In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server
To Enable the sa login.
In Object Explorer, expand Security, expand Logins, right-click sa, and then click
On the General page, you might have to create and confirm a password for the
On the Status page, in the Login section, click Enabled, and then click
You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:
If you are running SQL Server 2005 by using an instance name and you are not using a specific TCP/IP port number in your connection string, you must enable the SQL Server Browser service to allow for remote connections. For example, SQL Server 2005 Express
is installed with a default instance name of Computer Name\SQLEXPRESS. You are only required to enable the SQL Server Browser service one time, regardless of how many instances of SQL Server 2005 you are running. To enable the SQL Server Browser
service, follow these steps.
Important These steps may increase your security risk. These steps may also make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We recommend the process that this article describes
to enable programs to operate as they are designed to, or to implement specific program capabilities. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this process in your particular environment.
If you choose to implement this process, take any appropriate additional steps to help protect your system. We recommend that you use this process only if you really require this process.
Note When you run the SQL Server Browser service on a computer, the computer displays the instance names and the connection information for each instance of SQL Server that is running on the computer. This risk can be reduced by not enabling the SQL
Server Browser service and by connecting to the instance of SQL Server directly through an assigned TCP port. Connecting directly to an instance of SQL Server through a TCP port is beyond the scope of this article. For more information about the SQL Server
Browser server and connecting to an instance of SQL Server, see the following topics in SQL Server Books Online:
These steps apply to the version of Windows Firewall that is included in Windows XP Service Pack 2 (SP2) and in Windows Server 2003. If you are using a different firewall system, see your firewall documentation for more information.
If you are running a firewall on the computer that is running SQL Server 2005, external connections to SQL Server 2005 will be blocked unless SQL Server 2005 and the SQL Server Browser service can communicate through the firewall. You must create an exception
for each instance of SQL Server 2005 that you want to accept remote connections and an exception for the SQL Server Browser service.
SQL Server 2005 uses an instance ID as part of the path when you install its program files. To create an exception for each instance of SQL Server, you must identify the correct instance ID. To obtain an instance ID, follow these steps:
To open Windows Firewall, click Start, click Run, type firewall.cpl, and then click
To create an exception for SQL Server 2005 in Windows Firewall, follow these steps:
To create an exception for the SQL Server Browser service in Windows Firewall, follow these steps:
Dec 13, 2009 05:45 PM|shantanu.gupta|LINK
Here is the resolution to error 26. Check this video to configure your error. It was a real headache for me for a long time. But this worked.
asp net 3.5
SQL Server 2008
Dec 19, 2009 05:04 AM|shijobaby500|LINK
Dec 19, 2009 04:52 PM|bill_twomey|LINK
If you run into connection problems on a 64 bit (say your new Windows 7 system, using SQL BI Development Studio) add your aliases under SQL Native Client 10.0 Configuration (32 bit)
Jul 09, 2010 11:12 AM|sherylr1969|LINK
I am getting this error in Visual Studio 2010. Can you help me with that? I can be reached by email at
Apr 25, 2016 10:05 AM|JohnsonWelch|LINK
This solution worked like a charm, I hope this will help. http://www.sqlserverlogexplorer.com/fix-error-code-26/