I wrote a program, on my computer it works correctly because SQL Server us running on my computer, but another computer in the network can't use the database.

Here is the definition of the connection string in my program : string cs = @"server=tcp:shiva-pc,49172;database=mydb;User ID = as; Password = 123;";

and when I run the program on another computer this is the error:

"A network-related or instance-specific 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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)"

I read some articles about "connecting from another computer" or "choosing a network protocol" and I did whatever they did, however, it did not work and I still have the problem.

closed as unclear what you're asking by Philᵀᴹ, Tom V, mustaccio, Paul White Dec 20 '15 at 22:29

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


If you are able to connect ok but your colleagues cannot then it could be a few things.

Firstly check that you have enabled remote connections to the SQL instance. There is a good article about it on the MSDN blog here:


Also, check to see which protocol you are using and make sure that it is one that can be access by clients that are not on the same machine as you. You can find details on how to do this here:


And here are details on how to connect from a different computer:


Finally, check your firewall if you have one set up and see if it allows incoming connections to the port that SQL Server is listening on.

Not the answer you're looking for? Browse other questions tagged or ask your own question.