Connect to SQL Server Error

I am trying to connect to a SQL Server and am getting an error. The servers I tried connecting to are in Amazon AWS, and in Azure. Neither are working. I tried from a different computer, and it works fine, so I know it's a config issue on my machine.


A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server ws not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (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

* I don't have any AV software installed, just Windows Defender.
* I created an outbound rule to allow all connections on outbound 1433
* The SQL instance I installed is LocalDB, so I don't have any SQL services running.

Does this mean I can't connect to remote databases?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What are you using to connect, the issue is because the client connection is trying to use named pipes versus TCP/ip which is likely why it can not connect to the remote SQL instance/host.

You need TCP/ip set as the means?
Are you using a DSN?
pzozulkaAuthor Commented:
I am trying to connect using the 2014 SQL management studio.

The configuration manager shows tcp enabled and named pipes enabled.
Before you connect, look at the option in the ssms interface, and make sure the TCP/ip is selected, then connect.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

pzozulkaAuthor Commented:
Not sure what is DSN
pzozulkaAuthor Commented:
Where is the tcp option you are referring to in ssms
In ssms, advanced.

Look on the same line where you gave connect, cancel, or OK, there is another button that deals with the client connection options I.e. Named pipes, TCP/ip, dynamic or specific port etc.  do not have a view  using this interface to .........
Dsn (odbctab) where you define a local identifier that includes within the server, database/schema and means to connect, username/password, etc.
pzozulkaAuthor Commented:
After coming home, it seems to be working after specifying to use tcp in advanced settings of ssms. However, it all of a sudden works from my application as well.

When Ibsaid earlier that I tried it on another computer and it worked, that other computer was on a different network. I'm wondering if there was a firewall blocking my connection attempts. I'll try this theory today.
The error in your message points to the issue of the method for connection.
In the older versions, there is/was a client config utility to set TCP/ip as the preferred method.

The error that reflects/points to TCP/ip or firewall issues on the server is different.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pzozulkaAuthor Commented:
The error states that it is a named pipes issue. I wonder if the public wifi network i was on was blocking outbound port 1433. The SQL server management console shows tcp and named pipes enabled, and tcp is order #2 while named pipes is #3. Is it possible that since tcp didn't work out (because of blocked outbound 1433 traffic) it went ahead with named pipes?
The setting on the server/order means nothing iMHO.
If the client initiated a TCP/ip connection, the error would have reflected that.

If you return and the issue remains, than something else is in play.
pzozulkaAuthor Commented:
So as I mentioned earlier, this has worked all week no problem. I just returned to the wifi network where the original problem occurred last week, and it's not working again. So I'm going to assume port 1433 is blocked outbound on this network.
Or it is being blocked on the remote side i.e. only permitted from specified location.
check the AWS to see whether you have an option to configure/restrict from where connections can be made to the SQL server.
pzozulkaAuthor Commented:
That's the first thing I thought of as well last week, so configured remote side to accept connections from entire world. Yes not secure :)
Look into whether you can establish a VPN connection to the aws setup.......
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.