Con più domande
I am using Windows 7 Ultimate, Visual Studio 2010 and SQL server 2008 on my PC.
I build a simple SQL database program with Visual Basic 2010 on my pc and it run smoothly,
but when I distributed the program to others PC on the same network I got error 26 - Error Locating Server/Instance Specified.
I have followed the steps in this article :
but the program still could not connect to my SQL Server if run from other PC.
When I use the portqry tools I got this report:
UDP port 1434 (ms-sql-m service): NOT LISTENING
I have disabled windows firewall.
Just could not figure it out what went wrong and really appreciate it if someone can help me solve this.
Tutte le risposte
Are you *sure* that you followed the steps in the article that you mention? Note step 4: "Make sure SQL Browser service is running on the server". If SQL Browser is running, it should be listening on port 1434, but your prtqry shows that this port is not being listened on. Go into the Services in control panel and verify that the SQL Browser service is running.
Note that the article only tells you how to get rid of error 26, but you may still fail to connect to SQL Server if yu have not enabled it to support external connections (which are disabled by default when it is installed). There are two places to check:
1) In SQL Server Configuration Manager, Network Configuration, verify that the TCP/IP protocol is enabled. [As an aside, here you can assign a fxed port to your named instance if you do not want to use the Browser service].
2) Use Sql Server Management Studio to open the Properties of the server, and in the Connections tab verify that "Allow remote connections to this server" is checked.
- Proposto come risposta Kalman Toth sabato 17 luglio 2010 08:05