“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 connection. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)”
This error might have occured due to the following reasons.
1. SQL Server doesn’t allow a Remote Connection.
Check if the local/remote connections have been enabled for instance.
Click Start > All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration.
Select Option “Surface Area Configuration for services and connection“.
Select the sql server component for which you want to allow remote connection.
Select “remote connection“, you will now be able to see the settings for this instance. If you want to allow remote connections. Then Select “Local and Remote Connections” Then “Using both TCP/IP and Named Pipes” then Apply.
A message will appear to restart the services.
For this either restart the system or
Click Start > Run > Type “Services.msc” > Right Click on your SQL Server Instance > Restart the service.
Now your SQL Server is ready to accept the remote connections.
Now if the Problem still exists. Then the problem belongs to your network.
2. Your Firewall might not be turned off or No exception is added.
UDP port 1434 should be put into exception if firewall presents. Or turn Off your Firewall.
Now Check if both the system are getting cross ping.
Click Start > Run > Type “ping ‘IP address of remote System’ -t “
On system 1
ping IP address of System 2
On system 2
Ping IP address of system 1
If both the system are getting reply then it means there is no problem in network.
Else check your antivirus firewall or disable antivirus for few minutes. Now if you still dont gets a reply then your network has a problem. Else you will be able to connect to the remote server.
3. Same Name Conflict between two systems to whom you are trying to connect.
Then there could be a same name conflict between two systems. Check if you are trying to connect to the remote machine whose computer name is same as your’s system name.
Eg. System 1 name is “admin”
Remote system name is also “admin”
you are now trying to connect to remote system but it displays error 26. Then this problem is due to same name conflict. Try to connect to remote system using its IP address, as IP address of each system in a network is always unique.