Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 error: 26 - Error Locating Server/Instance Specifi

Author  Topic 

imbrod
Starting Member

10 Posts

Posted - 2008-10-31 : 07:17:56
Hi,
I wasn't working with MS SQL for a while. When I installed VWD 2008 Express & SQL Express, I tested some simple apps with database and it was working fine before.

Months later, I tried clicking on the database in VWD and got this 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)

I even tried programatically to connect to db, and the output was the same error.

What should I do? It was working fine in the past, I tried it now on 2 local machines on Windows XP Pro SP2, both with the same error, and both were working fine before. Maybe some windows update messed it up?

saurabhsrivastava
Posting Yak Master

216 Posts

Posted - 2008-10-31 : 07:34:06
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \\ to \. If you are not sure about your application, please try both Server\Instance and Server\\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2008-10-31 : 08:20:40
also check sql server surface area configuration for remote connection's options.
Go to Top of Page

imbrod
Starting Member

10 Posts

Posted - 2008-10-31 : 10:58:57
I changed remote connection to true in sql server surface and it works.
Thanks!

I just remembered the reason why it stopped working:
I made a 'clean boot' on both computers, therefore SQL was stopped at boot!

Thank you all!
Go to Top of Page

gunavathieswar
Starting Member

3 Posts

Posted - 2010-12-10 : 03:59:00
i got the same error. plz reply where i have to change my code.
Go to Top of Page
   

- Advertisement -