Hi team,
I am looking for a way for updating host information of virtual machines through Business Adapter Studio. Unfortunately there is no direct property for host. Hence I assume "Custom Query" can be used to update this information. As I am not familiar with custom queries I am looking for an example. Can anyone share the same with me?
Kind Regards,
Wolf-Dietrich
‎Mar 17, 2021 05:46 AM
Hi,
Here is some pseudo-code:
UPDATE vm
SET vm.HostComplianceComputerID = host.ComplianceComputerID
FROM ComplianceComputer cc
JOIN VirtualMachine vm
ON cc.ComplianceComputerID = vm.ComplianceComputerID
JOIN Mapping m
ON cc.ComputerName = m.VMName
JOIN ComplianceComputer host
ON m.HostName = host.ComputerName
Some assumptions and details:
Please be careful, maybe start testing this with only a few samples. Maybe do make a backup before.
Best regards,
Markward
‎Mar 17, 2021 09:43 AM
Hi,
Here is some pseudo-code:
UPDATE vm
SET vm.HostComplianceComputerID = host.ComplianceComputerID
FROM ComplianceComputer cc
JOIN VirtualMachine vm
ON cc.ComplianceComputerID = vm.ComplianceComputerID
JOIN Mapping m
ON cc.ComputerName = m.VMName
JOIN ComplianceComputer host
ON m.HostName = host.ComputerName
Some assumptions and details:
Please be careful, maybe start testing this with only a few samples. Maybe do make a backup before.
Best regards,
Markward
‎Mar 17, 2021 09:43 AM
‎Mar 18, 2021 12:04 PM