Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: 2817 | Views in the last 30 days: 10
 
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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones