Link to home
Create AccountLog in
Avatar of pragmatistMS

asked on

Window Server Firewall and SQL Server -- Accessing from Windows 10 client

On my home network, I have the Windows Server (2012 R2) set up as a domain server and I have SQL Server (2014 developer edition)installed.  From my Windows 10 client machine, I am trying to connect to the SQL Server using Visual Studio 2013.  The Windows firewall on the server (and perhaps other factors) are causing problems.  

I will just try to go through the facts:

1.  If I turn off the server firewall, I can reach the SQL DB from SQL Management Studio or Visual Studio on the Win10 client, but performance is painfully slow if I use TCP as the protocol.
2.  When using named pipes, connecting to the DB server from SQL Management Studio on the client works fine and feels fast as expected.  
3.  Visual Studio does not have a protocol option so I can't use named pipes, it forces me to use TCP so it will only work with the firewall completely turned off and is slow (same as #1 above)
4.  Turning on the firewall blocks the connection, even though I believe I have all the appropriate ports opened (I'm sure I've missed something but I'm open to ideas)
5.  When I ping the server from the client, I get <1ms as expected, but it shows the address as a hex address rather than an IP address.
6.  I'm able to reach the hard disk of the server from the client with \\MYSERVER\c$ without problem and with good performance
7.  I am trying to connect from the client using SQL Server authentication (the sa account and the password), the client is not logged into a domain account.

Can anyone help?  I want to leave the firewall on the server on, but be still able to connect with Visual Studio (no named pipes) and with decent performance.  I am not an experienced at server administration at all, my focus is development, so there's lots I don't know here.

Thanks for any help you can provide.
Avatar of Ganesh Anand
Ganesh Anand
Flag of Bahrain image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of pragmatistMS


Thanks for the link to the article, after I looked at the screenshot I went back and checked the protocols for MSSQLSERVER under SQL Server Network Configuration, and it showed TCP/IP as disabled.  After I enabled it, all seems to be working as expected with the firewall port rules I already had in place.  It is somewhat puzzling, first because I checked that property early on and it was enabled (not sure how it later became disabled), and also that it worked at all with the firewall off, even with reduced performance, if TCP was disabled before?  It seems to be working fine now, from all clients, so I'm happy to live with that mystery.

Thanks again for the response.
I am glad your issue is resolved.