I am trying to create a setup using ClickOnce on machine A and install it on machine B using a USB stick. when I do the setup from machine A to B I get this message. "A network related instance error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Provider: SQL Server Network Interface, error – 26- Error locating server/instance specified" Can someone please tell me exactly how to make the connection string so that machine B can run the install? Thank you in advance.
Asked
Active
Viewed 58 times
0
-
What does the connection string that you have look like? Can you ping the database server from machine B? – andreamc Dec 10 '15 at 23:40
-
This is what my connect string looks like on machine A "DATA SOURCE=MTB\SQLEXPRESS;DATABASE=ABC;INTEGRATED SECURITY=TRUE" please note that I am a beginner try not to use technical terms as I am not used to the lingo yet. Thank you – Dominique1256 Dec 10 '15 at 23:44
-
On machine B, can you open the Command Prompt program and type `ping MTB` to see if it can reach the database server? – andreamc Dec 10 '15 at 23:48
-
No. Message says "MTB is not recognisez as an internal or external command, operable program or batch file" – Dominique1256 Dec 10 '15 at 23:54
-
Can you double check that you did the command correctly? Don't forget the word `ping` – andreamc Dec 10 '15 at 23:56
-
Basically to be clearer on my question is how to have a winform application on a USB that can be installed on any computer. – Dominique1256 Dec 10 '15 at 23:57
-
Andrea you are a genius, I did forget PING now it is working – Dominique1256 Dec 10 '15 at 23:58
-
Well that's a much bigger question. The reason your connection string isn't working though could be a number of things - maybe your database server is not reachable from Machine B (which we can test with `ping`). Or maybe the user you are logged in as does not have proper access to the database. We need to track the problem down one step at a time. – andreamc Dec 11 '15 at 00:00
-
Cool, so what does the output say? Did it get replies from MTB? – andreamc Dec 11 '15 at 00:01
-
Yes it did. it show what I believe to be an ip address 32 bytes of data reply from...ip #'s bytes = 32 time=110s etc. – Dominique1256 Dec 11 '15 at 00:04
-
Awesome, so that rules out one potential problem. Is Machine A the same as MTB? If so, then you should look into if SQL Server is configured to allow remote connections (as specified in the error message). Check out the options here: http://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci – andreamc Dec 11 '15 at 00:11
-
Thank you very much for your help I always have a great respect for people's expertise who share their knowledge with others. – Dominique1256 Dec 11 '15 at 00:13