See the light!

SQL Server 2016: allowing remote connections on Windows Server 2016

Getting SQL Server 2016 to accept remote connections on Windows Server 2016 is a two-part fix, both parts easy to forget one of when you’re doing this for the first time on a fresh box. This covers a same-network-segment LAN scenario — connecting from outside the local network needs additional firewall configuration on top of this.

1. Open the inbound firewall for the SQL Server TCP port

Launch Windows Firewall with Advanced Security, and create a new inbound port rule.

windows-2016-firewall-inbound-new-port-01

Set the TCP port to SQL Server’s default port of 1433.

windows-2016-firewall-inbound-new-port-02-tcp-1433

Allow the connection.

windows-2016-firewall-inbound-new-port-03-tcp-1433-allow-connection

Allow connection from the specific network location choices.

windows-2016-firewall-inbound-new-port-04-tcp-1433-allow-connection-network

Give a name to your firewall rule. You’re finished with the server firewall configuration.

windows-2016-firewall-inbound-new-port-05-tcp-1433-allow-connection-name

2. Enable TCP/IP listening in SQL Server Configuration Manager

Launch SQL Server Configuration Manager.

sql-server-configuration-manager-13-01

Enable TCP/IP.

sql-server-configuration-manager-13-02-tcp-enable

For the TCP/IP Properties, set IPAll to listen on TCP Port 1433 (the default port for SQL Server).

sql-server-configuration-manager-13-03-port-listen

Restart the SQL Server service to effect the changes. Your SQL Server is now ready to accept remote connections.

sql-server-configuration-manager-13-04-service-restart

Test your connection

Launch SQL Server Management Studio and key in your [target server]\instance,port. Then Connect… In this example, it’s TheServer\MSSQL2016,1433.

sql-server-2016-remote-connect

That’s all to it — enjoy your remote connection.