You can get information about the
hosts’ IP address can be available by
using the “ipconfig” command line
If you can connect to a SQL Server instance by name, then the name is registered within DNS. Just ping the name and you'll be able to determine the IP address of the database server. No reason to run ipconfig on the server itself.
In order to determine the port the server is using to listen for incoming connections, run the following query (requires VIEW SERVER STATE permissions)
[c].[local_net_address] as [server_ip_address],
[c].[local_tcp_port] as [server_ip_port]
[c].[session_id] = @@SPID
Please note that using IP addresses
and port numbers may not be a
successful connection strategy if the
server is on a DHCP network (where the
IP address may change with each
Servers should have static IP addresses.
commented on May 2 2012 10:44AM