Vendredi, Octobre 29, 2021
Afficher les IPs d’une machine
SELECT
nia.node.Vendor, nia.node.MachineType,
nia.Node.Caption,
nia.IPAddress
FROM
Orion.NodeIPAddresses nia
WHERE
nia.IPAddress not in ('::1','127.0.0.1') and nia.Node.Caption = 'mytestmachine' -- exclusion des loopback et filtre sur la machine 'mytestmachine'
ORDER BY
nia.Node.Vendor,
nia.Node.MachineType,
nia.Node.Caption
Afficher les IPs dupliquées
SELECT
nia.Node.Caption as [Node 1],
nia.IPAddress,
nia2.Node.Caption as [Node 2]
FROM
Orion.NodeIPAddresses nia
JOIN
Orion.NodeIPAddresses nia2 ON nia.IPAddress = nia2.IPAddress
AND nia.NodeID != nia2.NodeID
Afficher toutes les IPs de tous les nodes
SELECT
nia.node.Vendor, nia.node.MachineType,
nia.Node.Caption,
nia.IPAddress
FROM
Orion.NodeIPAddresses nia
WHERE
nia.IPAddress not in ('::1','127.0.0.1') -- exclusion des loopback
ORDER BY
nia.Node.Vendor,
nia.Node.MachineType,
nia.Node.Caption