Update Hostname from CSV

I have a csv which contains hostname and IP address

Is there a way to update the hostname for each IP in the csv file

name,ip
host1,10.10.10.2
host2,10.10.10.3
host3,10.10.10.4

The csv file contains oveer 2,000 hosts names and the IP address, so not something I can do manualy.

Parents
  • I managed to to this by changing the CSV file to xlsx

    then adding colum C and adding the following formula into Col C

    ="UPDATE [dbo].[IPAM_Node] SET DnsBackward = '" &A5&".yoox.net', sysName = '" &A5&"' , SkipScan = '1', Status = '4'  WHERE IPAddress = '"&B5&"'"

    Resulting in

    host1 10.10.10.2 UPDATE [dbo].[IPAM_Node] SET DnsBackward = 'host1.yoox.net', sysName = 'host1' , SkipScan = '1', Status = '4'  WHERE IPAddress = '10.10.10.2'
    host2 10.10.10.3 UPDATE [dbo].[IPAM_Node] SET DnsBackward = 'host2.yoox.net', sysName = 'host2' , SkipScan = '1', Status = '4'  WHERE IPAddress = '10.10.10.3'
    host3 10.10.10.4 UPDATE [dbo].[IPAM_Node] SET DnsBackward = 'host3.yoox.net', sysName = 'host3' , SkipScan = '1', Status = '4'  WHERE IPAddress = '10.10.10.4'

    This allowed me to RDP to the Orion server and run the database manager and paste all col c as an SQL Update Query
    I also added skipscan and status 4 which marked the IP as reserved

  • ,

    Clever and works for sure, but you shouldn't need to manually do that in the database. You can import supernets, subnets and ip addresses into IPAM.

    documentation.solarwinds.com/.../ipam-import-spreadsheet.htm

Reply Children
No Data