http://www.sqlservercentral.com/blogs/steve_jones/2010/06/17/finding-sql-server-client-ports/

Printed 2014/08/01 02:17AM

Finding SQL Server Client Ports

By Steve Jones, 2010/06/17

I saw a post recently asking if there was an easy way to find the port a client was using on a SQL Server since someone had multiple instances. I asked for some information since there are actually multiple ports in use.

The port the SQL Server listens on

The port the client server opens a connection on their side

The first one comes from a few places. It’s easily found in the Configuration Manager GUI as shown below:

SQLServerPort

These are the TCPIP properties for my service.

Finding the client port, which is probably needed for tracing/troubleshooting, is easy to do as well. You can query sys.dm_exec_connections, and see how clients are connected. I don’t have any TCP connections on my instances, since I am local it’s through shared memory, but here’s where you’d find it in the result set:

SQLServerPort2 

I’ve typically not worried about port, but the client_net_address has been valuable to me in the past.


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.