By: Daniel Calbimonte | Updated: 2022-04-14 | Comments | Related: > SQL Server Configurations
Problem
I have heard that Microsoft SQL Server uses many different IP ports for access to various components of the product. Can you explain what these are and what ports might need to be configured on the firewall to access various components of SQL Server?
Solution
In this tutorial, we will look at several aspects of ports that are used for SQL Server access. We will cover these questions:
- What are SQL Server TCP and UDP ports?
- Why is the SQL Server port important?
- What is the default SQL Server port?
- What is port 1433?
- How are the ports configured?
- How can the ports be changed?
- How can you find out which port SQL Server is listening on?
- How do you set up Windows Firewall access with SQL Server?
- If you have multiple SQL Server instances on a machine, are they all listening on the same ports?
What are the Microsoft SQL Server TCP and UDP ports?
TCP stands for the Transmission Control Protocol. Which comes from the TCP/IP protocol used to connect devices on the Internet. TCP/IP is a connection-based protocol that requires a connection between the source and the destination. In TCP the ports have numbers and are used to handle processes and services inside the network. The ports are a standard to communicate between devices.
We also have UDP ports. UDP stands for User Datagram Protocol which is a member of the internet protocol suite. The UDP is used to send messages (datagram) to other hosts. UDP is usually used when error checking is not necessary. That is why is a fast protocol.
In SQL Server, different services work on different ports. Here is a list of some of the most important default ports used by SQL Server.
Port number | Type | Use |
---|---|---|
135 | TCP | WMI, MSDTC, Agent file copy, T-SQL debugging |
80 | TCP | To publish SQL Server Reporting Services (SSRS) reports using HTTP |
443 | TCP | To publish SSRS reports using HTTPS |
500 | UDP | IPSec to encrypt connections |
1024 to 5000 | TCP | Dynamic ports for named instances |
1433 | TCP | Database engine default instance |
1434 | TCP and UDP | DAC and the SQL Browse |
2382 | UDP | SQL Server Analysis Services with dynamic ports |
2383 | TCP | SQL Server Analysis Services (SSAS) |
2725 | TCP | SQL Server Analysis Services (SSAS) |
3343 | UDP | Cluster network driver |
3882 | TCP | SQL Server Integration Services (SSIS) |
4022 | TCP | SQL Broker Service |
4500 | UDP | IPSec |
5000 to 5099 | UDP | Clusters |
5022 | TCP | AlwaysOn |
7022 | TCP | Database Mirroring |
8011 to 8031 | UDP | Cluster internode |
49152 to 65535 | TCP | More dynamic ports for named instances |
Why are the SQL Server ports important?
With the ports we have a standard way to communicate with our devices. We can use multiple services using the different ports and we can also handle multiple processes using the ports. For example, we use the 3882 port for SSIS and 1433 for the database engine with the use of ports we have a simple way to communicate and use the services and processes.
What is the default SQL Server port?
The default port for the SQL Server database engine is the 1433. You can check the protocols by going to the SQL Server Configuration Manager. Then go to SQL Server Network Configuration > Protocols for MSSQLServer right-click TCP/IP and select Properties.
Go to the IP Addresses page and look for the TCP Port.
How are the ports configured?
If you want to change the default port for security reasons, open SQL Server Configuration Manager. Then go to SQL Server Network Configuration > Protocols for MSSQLServer right-click TCP/IP and select Properties.
Go to the IP Addresses tab and look for IPALL and change the TCP Port number to a different value and press Apply and OK in the dialog boxes.
Finally, restart your service using SQL Server Management Studio (SSMS).
If you want to know how to change default ports in Linux, please refer to this article: How to change the default port for SQL Server on Linux.
How can you find out which port SQL Server is listening on?
There are 3 ways to know which port is being used. You can look at the SQL Server Error logs, use SQL Server Configuration Manager or use Windows Application Event Viewer. For more information about this topic, read the following article: Identify SQL Server TCP IP port being used.
If you need to change the TCP port on SQL Server Cluster, please refer to this link: Updating the TCP Port on a SQL Server Cluster Node.
How do you set up Windows Firewall access with SQL Server?
This tutorial, Configure Windows Firewall to Work with SQL Server, shows how to use the Windows Firewall to protect the server and enable the ports required. The tutorial will show you how to enable and disable ports.
If you have multiple instances of SQL Server on a machine, are they all listening on the same ports?
No, the default instance is usually installed using port 1433 while the other instances use dynamic ports. The following article shows how to check the ports used by your instances: Identify SQL Server TCP IP port being used.
Next Steps
If you want to learn more about SQL Server ports, please refer to the following links:
- Remove Dynamic Port Configuration from a SQL Server Instance
- Automated way to get all port information for SQL Server instances
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2022-04-14