Find IP and Port using SQL SSMS


Find IP and Port of a SQL Server from a client machine. The script will not provide all the information if you are connected to the host/local machine of the SQL server. It will only work when you are in a client machine, SSMS is installed in the client machine & you are connected to the SQL server via SSMS.

Run the below script in using SSMS (SQL Server Management Studio).

TSQL Script

or run below TSQL Script
Both the script will provide the same result.



Leave a Reply

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