Skip to content

Instantly share code, notes, and snippets.

@coryasilva
Created February 6, 2024 22:02
Show Gist options
  • Save coryasilva/25cf949507ad6e9db4fc6fc7979afec9 to your computer and use it in GitHub Desktop.
Save coryasilva/25cf949507ad6e9db4fc6fc7979afec9 to your computer and use it in GitHub Desktop.
MSSQL get port
select distinct local_net_address, local_tcp_port
from sys.dm_exec_connections
where local_net_address is not null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment