Reputation: 473
Just recovering my server from a major crash, which led to windows server 2016 being re-installed...
I have a desktop application which connects to the sql server database, trouble is now I have the database setup on the server I cant remember how to make it available to external sources (the application)
Can you help?
Upvotes: 6
Views: 24266
Reputation: 51
For any of you using Named instances (or SQL Express) you need to also open up UDP port 1434. Here are command lines I used instead of the above UI process.
To Open TCP (SQL Server and SQL Browser):
NETSH advFirewall firewall add rule name="Allow: Inbound: TCP: SQL Server Services" dir=in action=allow protocol=TCP localport=1433,1434,2382
To Open UDP (SQL Server Dynamic for Named and SQLEXPRESS):
NETSH advFirewall firewall add rule name="Allow: Inbound: TCP: SQL Server Services Dyn" dir=in action=allow protocol=UDP localport=1434
Upvotes: 5
Reputation: 435
Use the following steps to enable remote connections to your SQL Server,
Enable TCP/IP and Open 1433 port
Make sure that the TCP Port is 1433.
Configure a Windows Firewall for Database Engine Access
Take Windows Administrative tools
In the Action window select the Allow the connection to specify the action to be taken when a connection matches the conditions specified in the rule
Specify the profiles for which the rule applies in the Profile window, and click Next
Configure remote access on a named instance of SQL Server
Upvotes: 24