I have read here that this is not the recommended thing, but still, how do we go about deleting machines completely from FNMS completely from Compliance and Inventory databases. I have seen some scripts here, but unable to find those posts.
Could someone help me.
Nov 06, 2020 01:15 AM
Could you please specify, what you're planning to do? Do you want to delete all machines or only specific ones?
Nov 06, 2020 01:57 AM
Hi @mfranz We would like to delete specific machines, those which are not in circulation anymore.
Nov 06, 2020 02:48 AM
If a computer is removed from the Inventory database (specifically, the Computer_MT table) AND it exists in no other 3rd-party source, then the next full reconciliation will remove the associated machine from the Compliance database.
The following KB is quite old, but the section "Computer deletion using direct SQL statements" still holds true:
As always, a backup is advised beforehand in case you need to restore the data.
Nov 06, 2020 02:55 AM
For reference, the following thead may also provide some helpful tips for doing bulk deletions of records: Deleting old inventory records
Nov 06, 2020 03:19 AM
As I see, it uses the following to delete computer from the inventory database
DECLARE @ComputerID INT
SET @ComputerID = ID of the computer to be deleted
EXEC DeleteComputer @ComputerID
For deleting a computer from the Compliance database, I suppose it is ok to delete it from All Inventory, and that will be all? Or would some other steps be needed? We are all assuming that the computer is not from a third party source.
Nov 09, 2020 05:35 AM
The overnight reconciliation will remove the device from the ImportedComputer table in the Compliance database, and subsequently the ComplianceComputer table (which will then make it disappear from the UI).
However, if you want to speed up the process of getting the device out of your UI, then yes, removal from All Inventory should be sufficient.
Nov 09, 2020 05:39 AM
Nov 09, 2020 06:04 AM
If you want to delete computers based on how long it is since they have returned inventory, check out the following post about a new capability for doing this: Auto-cleanup of Obsolete FlexNet Inventory.
Jan 24, 2022 12:06 AM