Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Get IP Addresses of all Hostnames using SQL Server

By Sumit Agarwal,

I had 500 hostnames in a trace file output and requirement was to get the IP addresses against each  hostname so I had exported all the hostnames in a table in master Database and then created 'usp_getIPAdress_frm_Hostname' stored procedure in the same database and passed the table name as an input.

Please insert all the hostnames in a table (column name should be 'hostname') and then pass the table into the procedure. It will return the IP addresses for all hostnames without any changes in the source table. 

Total article views: 4197 | Views in the last 30 days: 7
 
Related Articles
FORUM

changing the hostname

changing the hostname

FORUM

How to track the user,hostname to get the info about who has truncated the table

tracking the hostname who truncated the data

FORUM

Retrieve hostname in clustered environment from active node

Retrieve hostname in clustered environment from active node

FORUM

hostname and program_name not displayed in Sysprocesses table

hostname and program_name not displayed in Sysprocesses table

FORUM

How to track from which hostname the Store Procedure was changed

How to track from which hostname the Store Procedure was changed

Tags
dba    
 
Contribute