HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What ports does SQL Server use on Linux?

Submitted by: @import:stackexchange-dba··
0
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 netstat -ln,

  • ms-sql-s TCP 1433 for the server



  • ms-sql-m TCP 1434 for the Dedicated Administrator Connection which by default is enabled for local connections on 127.0.0.1 only. 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/udp


The "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/udp
spid19s     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.