:::: MENU ::::

SQL Server ports configuration

  • Oct 23 / 2012
  • 0
dbDigger, Ports, System Administration

SQL Server ports configuration

Ports are a logical point of connection provided and managed at OS level. OS directs the data arrived at NIC for a specific port to its specified application. SQL Server ports are used at instance level and a port can not be shared among multiple instances on same machine. Before going in to detail of ports configuration for SQL Server level, we should have a look at categories of ports

IANA Reserved Ports

These ports range from 0 to 1023. The Internet Assigned Numbers Authority (IANA) allots these ports only to standard protocols. Vendors or users may not use any port within this range.

Vendor Reserved Ports

Ranges from 1024 to 49151. These ports are registered by IANA for applications of specific vendors. Other users are not able to use any port within this range. For SQL Server the default reserved port in 1433.

Open for Users Ports

Ranges from 49152 to 65535. Ports within this range may be used for end user purposes. If we want to use dynamic or static customized port number then it should fall in this range.

SQL Server Default Port

Default instances of SQL Server use port no 1433 by default. However named instances and express edition use dynamically allotted port by default. It is a good practice to change the default 1433 port no to user allotted static port.

Port Types in SQL Server

For SQL Server we may classify the ports in following heirarchy
  • Dynamic Port (fall in the range between 49152 to 65535)
  • Static Port
    • Default Port (1433)
    • User Allotted (Any port between 49152 to 65535)

Choosing Between Static and Dynamic Port

Dynamic ports serve the purpose of simplicity and to use the ports other than default 1433 but there are scenarios when you have to allot a specified static port to the SQL Server instance. Especially while working with firewalls we have to exclude the ports explicitly from firewall rules. In such cases it is required to use a static port rather than a dynamic new port each time with SQL Server service start.

Can we use more than one port for single instance?

The answer to this major question is “YES”. We may configure a SQL Server instance to listen on multiple ports at a time. To learn and implement¬† this functionality read this article by Jugal Shah.

Here is a very good post about the ports that a DBA should have essential knowledge of. It contains the ports for all SQL Server endpoints and services.
And also a very good point added by Yusuf Anis
“And for those who still have pre win 2k8 boxes with them the dynamic port range is limited to 1024-5000 on both TCP & UDP.”

Consult us to explore the Databases. Contact us