SQL SERVER – Database Engine TCP Port and Browser UDP Port

I inspect TCP listeners to find the actual Network port in use. A customer wanted a query rather than an assumption.

A local doorway is inspected separately from the longer route beyond the courtyard.

SELECT ip_address, port, type_desc, state_desc
FROM sys.dm_tcp_listener_states WHERE type_desc = N'TSQL';
SELECT net_transport, local_net_address, local_tcp_port
FROM sys.dm_exec_connections WHERE session_id = @@SPID;
Historical TCP listener output; its displayed port applies to that instance and endpoint.
Historical TCP listener output; its displayed port applies to that instance and endpoint.

My original text incorrectly called 1434 the standard static port. The usual default engine TCP port is 1433, but configured and dynamic ports differ. Browser commonly uses UDP 1434. A dedicated administrator connection can separately use TCP 1434.

The listener DMV reports local listening endpoints. The connection DMV reports the current connection. Shared-memory connections can return NULL for address or port. Neither proves remote firewall, routing or DNS access.

Test the intended connection with its verified endpoint and protocol. An unrelated endpoint number does not justify opening a firewall. The linked connection-error and multiple-port articles provide more context.

Reference: Dedicated administrator TCP endpoint.

Related reading

A listener inventory is not a connectivity test, it is endpoint information to verify against the intended route.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

Computer Network, SQL Scripts, SQL Server
Previous Post
SQL SERVER – Capturing INSERT Timestamp in Table
Next Post
SQL SERVER – Query Shortcuts

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.