Configure the server

The port configured for the SQL Server instance affects the company's firewall settings and how you connect to the SQL Server database. The port is either static or dynamic:

  • Static port:

    • If you configure the default port 1433 or some other static port, you only need to allow inbound traffic via that port through the Windows firewall.

    • If you configure the default port 1433, you connect to the database with the name of the server only, e.g. SERVER01.

    • If you configure a static port other than 1433, you connect to the database with the server name and port in the format [server name],[port], e.g. SERVER01,1910.

  • Dynamic port (0 or no TCP port defined):

    • The port changes with every startup so you need to allow inbound traffic via the whole range of dynamic ports through the Windows firewall.

    • You need to open the UDP port 1434.

    • SQL Server Browser needs to be running on the server.

    • You connect to the database with the server name and the instance name in the format [server name]\[instance], e.g. SERVER01\MSSQLSERVER.

Do the following:

  1. Start SQL Server Configuration Manager.

  2. From the left of the dialog, select SQL Server Network Configuration > Protocols for [instance name]. In this example, the instance name is MSSQLSERVER.

  3. Right-click TCP/IP, and select Properties.

    The TCP/IP Properties dialog opens.

  4. For Enabled, select Yes.

  5. Select the IP Addresses tab.

  6. Below IPAll, define the port to use:

    • If you want to use a static port, enter 1433 or some other port in the TCP Port field. 1433 is the default communication port for SQL Server. If necessary, you can also leave the field empty in case you need to change the port later, for example – the port will then be a dynamic port that changes with every startup.

    • If you want to use a dynamic port that changes with every startup, enter 0 in the TCP Dynamic Ports field.

  7. Click OK.

  8. From the left of the dialog, select SQL Server Services.

  9. Right-click SQL Server ([instance name]), and select Restart. In this example, the instance name is MSSQLSERVER.

The service restarts itself with your modifications. You can close the program.

Next, connect to the SQL Server database.