How to set up remote connections in SQL Server?

To enable remote connections for SQL Server, the following settings need to be configured:

  1. Ensure that SQL Server is installed and running.
  2. Open the SQL Server Configuration Manager.
  3. Select “SQL Server Network Configuration” from the left side panel.
  4. Select “Protocols for [SQL Server Instance Name]” from the right-hand panel.
  5. Make sure the TCP/IP protocol is enabled. If it is not enabled, right-click on the TCP/IP protocol and select “Enable”.
  6. Right-click on the TCP/IP protocol and select “Properties”.
  7. Select the “IP Addresses” tab in the TCP/IP properties window.
  8. In the IP Addresses tab, locate the “IPAll” section and set the “TCP Dynamic Ports” to 0 and the “TCP Port” to 1433 (or any other port you want to use).
  9. Click on the “Apply” button, then close the TCP/IP properties window.
  10. In SQL Server Configuration Manager, select “SQL Server Services”.
  11. On the right-hand panel, locate the SQL Server instance that you want to configure.
  12. Right-click on the instance and choose “Restart”.
  13. Open the Windows firewall settings.
  14. Select “Advanced Settings” from the left-hand panel.
  15. Choose “Inbound Rules” from the right side panel.
  16. Find “SQL Server” in the “Inbound Rules” list (create a new rule if it does not already exist).
  17. Right-click on the rule and select “Properties”.
  18. Choose “This Computer” in the “Scope” tab of the “Properties” window.
  19. Select “Enabled” in the “General” tab of the “Properties” window.
  20. Click on the “Apply” button, and then close the “Properties” window.
  21. Turn off the Windows firewall settings.
  22. Now, you should be able to connect to the SQL Server remotely.

For safety reasons, it is recommended to only allow trusted IP addresses to remotely connect to the SQL Server and to use strong passwords to protect the SQL Server login credentials.

bannerAds