Below is a T-SQL statement that lets you get information about the IP-address and TCP-port number for a Microsoft SQL-server.
SELECT CONNECTIONPROPERTY('local_net_address') AS IPAddress, CONNECTIONPROPERTY('local_tcp_port') AS PortNumber;
Below is a T-SQL statement that lets you get information about the IP-address and TCP-port number for a Microsoft SQL-server.
SELECT CONNECTIONPROPERTY('local_net_address') AS IPAddress, CONNECTIONPROPERTY('local_tcp_port') AS PortNumber;