We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Connection to AWS SQL fails from local SQL server

Medium Priority
Last Modified: 2020-05-13
Using SQL Management Studio from our workstations, we can connect to AWS SQL. Firewall shows traffic on only port 1433. But using SQL Management Studio from our SQL cluster, we cannot connect to AWS SQL. Firewall shows that beside port 1433, ports 139 and 445 are also being tried and blocked. Why would SQL cluster use these two extra ports? What is the fix? Thanks.

Watch Question

Brian CroweDatabase Engineer
Top Expert 2005

Port 139 is used for TCP connections and port 445 is used for named pipes.


But the question is why are they being used for SQL client connection which should only need port 1433. All workstations only need port 1433. What should be changed on SQL cluster that it does not need these two extra ports?

TCP use 1433(default) and Named Pipe use UDP 137-139 and TCP 445, Your AWS TCP 1433 connection seems blocked at somewhere at the network part, probably the firewall on destination. then your client try to establish the Named pipe connection, and it is also blocked. that's the reason you couldn't establish the connection.

By the way your AWS SQL server is a platform or a VM? I mean sql as a service one or VM instance on AWS?

Better you check the access rules in AWS side, for inbound connections, ip whitelist etc. if it seems all ok, then check source side for outbound connection.
1. Check the connection to AWS SQL from SSMS on your notebook with any other network connection.



Thanks Pushpakumara.
The 139 port traffic seen is TCP, not UDP. What would that be needed?
Port 1433 is certainly allowed -- and yes we do block all other ports including 139 and 445.
At AWS, it is a VM.


Our issue was resolved when we chose TCP/IP Network protocol in Options.
Ok Good, default option is TCP disabled, you have to enable it in sql server network configuration. To connect using TCP, you just need to open TCP 1433 only. But you have to careful when opening 1433, Make sure you have allow access from your source, I mean in AWS firewall, open port 1433 to your public IP or your public IP range, instead of anywhere. 

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.