Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the listening TCP port to the Get-SQLServerInfo function output. #29

Open
nullbind opened this issue Aug 14, 2018 · 0 comments
Open
Assignees

Comments

@nullbind
Copy link
Collaborator

Add the listening TCP port to the Get-SQLServerInfo function output.

Option #1:
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-connections-transact-sql?view=sql-server-2017

select local_tcp_port from sys.dm_exec_connections where local_net_address is not null

Option #2
xp_regread from the mssql service settings.

@nullbind nullbind self-assigned this Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant