cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deleting Inventory Devices from All Inventory

Hi,

As per FNMS 2017R2 Release Notes, Page No:7 It has been mentioned that deleting the device from All Inventory will delete it from All discovered and Inventory DB as well. Below is the URL & Attached is the screenshot for reference. By any chance,did this changed on the later versions?

We are on 2019R2 muti tenant environment, but it is not working like it is mentioned. it is just deleting inventory from compliance DB. No other Inventory source,  Inventory is from Agent & Default AD connection.

https://docs.flexera.com/fnms2017r2/onpremises/FlexNet%20Manager%20Suite%20Release%20Notes%202017%20R2%20(English).pdf

https://docs.flexera.com/fnms2017r2/onpremises/FlexNet%20Manager%20Suite%20Release%20Notes%202017%20R2%20(English).pdf 

Note: I posted this question on   Deleting old inventory records,and seems it is solved already hence creating a new thread.

Thank you
Sasi

(1) Solution
There is another important piece i should have mentioned earlier, Database server name/ipaddress (which ever is in use) database connection string in registry key and server name in the compliance connection both should match otherwise delete inventory device would not be able to make a decision if device is from local direct FNMS inventory database connection.
Imported source server name:
SELECT [Server],* from ComplianceConnection where ConnectionName='FlexNet Manager Suite'
Database connection registry path:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ManageSoft Corp\ManageSoft\Reporter\CurrentVersion
Can you please check this, if it is different make it same. you may need to restart IIS and batch scheduler and processor service if value need to be changed in the registry.
HTH
Aamer

View solution in original post

(11) Replies

You need to delete the device from the Active Inventory or All Inventory view - this will delete the device from the FNMS Compliance Database.

You must also delete the same device from the Discovered Devices view - this will delete the device from the FNMS Inventory Database.

Deleting inventory or discovery device on delete linked inventory device from FNMS inventory database (not from third party inventory sources). FNMS 2019 R1 and later when user delete a inventory device from All Inventory page that is imported from FNMS inventory it will be removed from FNMS inventory source database as well but wouldn’t delete discovery record for the same device, same applies if discovered device is linked to RAW inventory record in inventory database, deleting discovery device will delete the linked inventory record and subsequent overnight FNMS inventory import will clean up from FNMS.

Hi @kclausen @AamerSharif 

Thank you for your reply! i have tested by deleting the device with both the below mentioned scenarios. 

1. Deleted from All Inventory page

2. Deleted from All Inventory page  & All Discovered page

But the devices is not getting removed from Inventory DB. After the reconcile the device get recreated on the compliancecomputer & discovereddevice table  and it again started appearing on All inventory & All discovered devices page.

we would like to perform the device deletion from UI rather than using storedprocedure. As per the links i have shared it looks like the device will be removed from both the DB's and it will not appear again on the UI unless its agent is actively sending the inventory. But unfortunately this is not happening on my environment.  Device not getting deleted from Inventory DB and getting created again(no other inventory source, Only default AD connection in place). Even the result is same for non AD devices.

Thank you

Sasi

 

Can you check the inventory source on the imported inventoried device, It may be coming from inventory source other than FNMS Inventory database. 

You can check this by opening the inventory device properties OR on the linked discovered device > Evidence tan should show RAW inventory data if it is linked to inventoried computer in inventory database.

Hi  @AamerSharif ,

Inventory source is from FNMS only, as i said i tried deleting(both on All Inventory & Discovered devices) a device which is not in AD also. But still the device got recreated. I have attached the a screenshot on which you could see created date is 6th April and the last inventory source as FNMS.

Device got recreated again on the compliance and discovereddevices tables.

kindly help us how to get this fixed.

Thank you

Sasi

@sasikumar_r 

I would recommend you open a support case to track it, if you believe that you've found a 'bug'.

Thanks,

Hi @JohnSorensenDK ,

Thank you for your response! Yeah i just raised a case & working with technician for resolving the same.

Sasi

There is another important piece i should have mentioned earlier, Database server name/ipaddress (which ever is in use) database connection string in registry key and server name in the compliance connection both should match otherwise delete inventory device would not be able to make a decision if device is from local direct FNMS inventory database connection.
Imported source server name:
SELECT [Server],* from ComplianceConnection where ConnectionName='FlexNet Manager Suite'
Database connection registry path:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ManageSoft Corp\ManageSoft\Reporter\CurrentVersion
Can you please check this, if it is different make it same. you may need to restart IIS and batch scheduler and processor service if value need to be changed in the registry.
HTH
Aamer

Hi @AamerSharif ,

Thank you for the information! 

Server name on the complianceconnection table and the Registry value both are different. we have recently migrated our application and Database to new servers, i hope that could be the reason for the difference.

Server name on the registry is pointing to the new Database server name, whereas on the complianceconnection table it is having our old database server name(which no more exist).

  • Shall we goahead and replace the old DBserver name  with new dbservername on the complianceconnection table?
  • is there any other table that i need to update with newdbservername? so that the new tenants will get updated with the correct dbserver name automatically on the compliance connection table?

Thanks Again for taking time to assist me on fixing this issue 🙂

Sasi

 

Hi @AamerSharif ,

Based on your input we have updated the complianceconnection table to match the server name with Registry server name. Now we are able to delete the device successfully 🙂 Deleting a device from UI deletes the record from both compliance & Inventory DB Table. However we fall into an another issue because of this migration+Upgrade (2019R1.3 to 2019 R2). There are duplicate entries for each devices on the Inventory DB Computer_mt table. One record with the old inventory date(date we upgraded the application) & Agentid. second record with new inventory date without agentid. no changes happened on the Agent side, version remains same 13.5.

By anychance do you know why a second entry got created post upgrading our application and how can we make these 2 entry into 1. 

Note: inventory from these 2 entries are getting merged and showing an application has installed,even if the application is uninstalled.

Hi,

In our 2019 R1 on premise environment if you have device present on listed tables:

  • [FNMSCompliance].[dbo].ImportedComputer      
  • [FNMSCompliance].[dbo].[DiscoveredDevice] 
  • [FNMSCompliance].[dbo].ComplianceComputer 
  • [FNMSInventory].[dbo].ComputerResourceData 
  • [FNMSInventory].[dbo].Computer_MT                 
  • [FNMSInventory].[dbo].[InventoryReport_MT]
  • [FNMSCompliance].[dbo].[Asset_MT]    (optional)
  • [FNMSInventory].[dbo].[ADComputer_MT]

 

And you delete inventory record from ‘All inventory’ view, the only place where device is removed before reconciliation / inventory import is ComplianceComputer table. I haven’t tested today, but this will result in restoration of device record after inventory import / reconciliation.

If device is linked to asset, and you unlink it before deleting in web UI, even ComplianceComputer record is not deleted, just status is changed to ‘Awaiting inventory’.

We are running 2019 R1, but we don’t have latest fixes deployed. Maybe there was a fix changing behaviour. For device in question inventory is reported only form FNMS agent and AD.

 

 

I use this script for visual testing of behaviour, just take snapshots before deletion, after deletion, and after reconciliation. And you will see how records are changed in inventory related tables. 

DECLARE @Computer nvarchar(50)

SET @Computer = 'cmputer_name'

SELECT 'ImportedComputer' AS Qname, *     FROM [FNMSCompliance].[dbo].ImportedComputer       WHERE ComputerName = @Computer

SELECT 'DiscoveredDevice' AS Qname, *  FROM [FNMSCompliance].[dbo].[DiscoveredDevice]  WHERE DeviceName = @Computer

SELECT 'ComplianceComputer' AS Qname, *   FROM [FNMSCompliance].[dbo].ComplianceComputer     WHERE ComputerName = @Computer

SELECT 'ComputerResourceData' AS Qname, * FROM [FNMSInventory].[dbo].ComputerResourceData    WHERE Name = @Computer

select 'Computer_MT' AS Qname, *          FROM [FNMSInventory].[dbo].Computer_MT                     WHERE ComputerCN = @Computer

SELECT 'Computer_MT, InventoryReport_MT' AS Qname, C.*, IR.*   FROM [FNMSInventory].[dbo].[Computer_MT] C

  LEFT JOIN [FNMSInventory].[dbo].[InventoryReport_MT] IR ON C.ComputerID = IR.ComputerID    WHERE C.ComputerCN = @Computer

SELECT 'Asset_MT' AS Qname, *             FROM [FNMSCompliance].[dbo].[Asset_MT]             WHERE ShortDescription = @Computer

SELECT 'ADComputer_MT' AS Qname, *        FROM [FNMSInventory].[dbo].[ADComputer_MT]         WHERE ComputerCN = @Computer