Click here to Skip to main content
15,560,073 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
cannot connect to (servername)
a network related or instance-specific error occured 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 connection(provider: named  pipes provider, error:40- could not open
a connection to sql server)(microsoft sql server , Error:53)
the network path was not found.

What I have tried:

hi, i am trying to login into my remote sql server, it gives me this error, can anyone can help me please,
Updated 5-Dec-21 21:03pm
BobbyStrain 5-Dec-21 23:32pm    
Where is it hosted?

1 solution

The error is explicit: the server name is not correct or is not configured for remote access.
Check your connection string - we can't see it - and use SSMS to try accessing it manually.

Remember that the server name will need to be "complete" - it will need the host domain or IP address for remote access:
Data;Initial Catalog=XXX;Persist Security Info=True;User ID=XXX;Password=XXX
Then check your firewall(s).

If that's all correct, then the DB Admin may have set it as rejecting remote access for security reasons - you will need to talk to them about it.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900