Configuring a Fixed Port

To enhance security, Microsoft Windows XP Professional Service Pack 2 (SP2), Windows Server 2008, and Windows Vista all turn on the Windows Firewall. When SQL Server Developer, Express, or Evaluation is running on Windows XP Professional and you want to connect to this instance from another computer, you must open a communication port in the firewall. The default instance of the Database Engine listens on port 1433; therefore, you do not have to configure a fixed port. However, named instances including SQL Server 2005 Express Edition listen on dynamic ports. Before you can open a port in the firewall, you must first configure the Database Engine to listen on a specific port known as a fixed port or a static port; otherwise, the Database Engine might listen on a different port each time it is started. For more information about firewalls, the default Windows firewall settings, and a description of the TCP ports that affect the Database Engine, Analysis Services, Reporting Services, and Integration Services, see Configuring the Windows Firewall to Allow SQL Server Access

Note

Port number assignments are managed by the Internet Assigned Numbers Authority and are listed at http://www.iana.org. Port numbers should be assigned from numbers 49152 through 65535.

Configure SQL Server to listen on a specific port

  1. In SQL Server Configuration Manager, expand SQL Server Network Configuration, and then click on the server instance you want to configure.

  2. In the right pane, double-click TCP/IP.

  3. In the TCP/IP Properties dialog box, click the IP Addresses tab.

  4. In the TCP Port box of the IPAll section, type an available port number. For this tutorial, we will use 49172.

  5. Click OK to close the dialog box, and click OK to the warning that the service must be restarted.

  6. In the left pane, click SQL Server Services.

  7. In the right pane, right-click the instance of SQL Server, and then click Restart. When the Database Engine restarts, it will listen on port 49172.

Next Task in Lesson

Opening Ports in the Firewall