patternsqlMinor
What ports does SQL Server use on Linux?
Viewed 0 times
portswhatsqldoeslinuxserveruse
Problem
What ports does SQL Server use on Linux? I want to be sure I'm forwarding the ports required when I run it in a container.
Solution
Assuming the defaults, there are two ports SQL Server listens on which can be verified with
While my install was only listening for TCP connections,
The "Microsoft SQL Monitor" is the DAC connection.
The log also shows similar information,
netstat -ln,ms-sql-sTCP 1433 for the server
ms-sql-mTCP 1434 for the Dedicated Administrator Connection which by default is enabled for local connections on127.0.0.1only. For more information see "remote admin connections Server Configuration Option"
While my install was only listening for TCP connections,
/etc/services shows entries for UDP too,ms-sql-s 1433/tcp # Microsoft SQL Server
ms-sql-s 1433/udp
ms-sql-m 1434/tcp # Microsoft SQL Monitor
ms-sql-m 1434/udpThe "Microsoft SQL Monitor" is the DAC connection.
The log also shows similar information,
spid19s Server is listening on [ 'any' 1433].
spid19s Server is listening on [ 'any' 1433].
Server Server is listening on [ ::1 1434].
Server Server is listening on [ 127.0.0.1 1434].Code Snippets
ms-sql-s 1433/tcp # Microsoft SQL Server
ms-sql-s 1433/udp
ms-sql-m 1434/tcp # Microsoft SQL Monitor
ms-sql-m 1434/udpspid19s Server is listening on [ 'any' <ipv6> 1433].
spid19s Server is listening on [ 'any' <ipv4> 1433].
Server Server is listening on [ ::1 <ipv6> 1434].
Server Server is listening on [ 127.0.0.1 <ipv4> 1434].Context
StackExchange Database Administrators Q#222569, answer score: 5
Revisions (0)
No revisions yet.