The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.
Hello Everyone,
We have a problem, where can see growing number of duplicates in FNMS.
Those devices have same names, but different serial numbers. Both records have SMS as last source of inventory, however when I check in System Center Configuration Manager UI, I see only one such device - let's give it a name of ‘DuplicateName1’ and Resource ID (MachineID in FNMS db) of ABC123.
I looked into ImportedComputer table, querying by same name and found two ‘DuplicateName1’ devices, each with different MachineID (previously mentioned ABC123 and new XYZ789) and distinct serial number.
As I understand this data is being imported directly from SCCM database. FNMS will query some tables and built computer records based on that. However if serial numbers are not the same, they will not be merged.
So I checked SCCM db from which we are doing the import and it looks like even though only one records shows up in SCCM UI, DuplicateName1 is there twice in Computer_System_DATA
and both MachineIDs can be found in multiple tables, like:
Computer_System_DATA, Disk_DATA, Processor_DATA, PC_Memory_DATA, and most importantly PC_BIOS_Data etc..
My idea is that, because serial numbers are different for each MachineID in PC_BIOS_Data, FNMS treats them as separate records and in the effect creates duplicates.
Did anyone else experience similar problems with SCCM? Is there any way to clear up such data? Seems like it would require updates to many tables
Looking at inventory dates I'd expect ABC123 should stay and XYZ789 should be removed.
Kind regards,
Jan
Jan 30, 2020 04:54 AM - edited Jan 30, 2020 05:02 AM
May 07, 2020 04:34 AM
I haven't experienced this, but I would investigate on the SCCM side whether 'DuplicateName1' actually somehow could be two different devices that by mistake have been given the same hostname. E.g. do the serial numbers (you see in the other SCCM tables) indicate that these are in fact different devices?
Thanks,
Feb 10, 2020 02:43 AM
Hi Jan,
FNMS tries avoiding duplicate computer entries when importing inventory data from SCCM.
The relevant code can be found in the "BuildRelevantComputerList" procedure that populates are temp table named #UniqueSMSComputers. The following code and comments can be found in the Computer.xml file that is part of the SCCM (SMS) reader:
-- we need to check if there are obsolete computers in SCCM,
-- but some databases do not have that column in them
-- it looks like a service pack or feature install that
-- creates this column.
-- This will require the usual workaround of executing a string, so
-- that SQL Server does not validate the schema and cause a failure on systems that
-- do not have the column.
-- this detects the presence of the column we need to use
-- @Obsolete will be null when the column does not exist
--
DECLARE @Obsolete int
SELECT TOP 1 @Obsolete = 1
FROM INFORMATION_SCHEMA.COLUMNS AS c
WHERE c.COLUMN_NAME = 'Obsolete0'
AND c.TABLE_NAME = 'System_DISC'
-- in the case of duplicate computer entries
-- ignore the older version in this table.
-- this will not affect software installs, because
-- they only use machineID as the key
IF @Obsolete IS NULL
BEGIN
EXEC ('INSERT INTO #UniqueSMSComputers (MachineID, InvDate) \
SELECT c.MachineID, MAX(c.TimeKey) as InvDate \
FROM Computer_System_DATA AS c \
GROUP BY c.MachineID')
END
ELSE
BEGIN
EXEC ('INSERT INTO #UniqueSMSComputers (MachineID, InvDate) \
SELECT c.MachineID, MAX(c.TimeKey) as InvDate \
FROM Computer_System_DATA AS c \
JOIN System_DISC AS s ON c.MachineID = s.ItemKey AND s.Obsolete0 = 0 \
GROUP BY c.MachineID')
END
As you can see, FNMS uses the [Computer_System_DATA].[MachineID] as well as the [System_DISC].[ItemKey] computer properties for duplicate checking.
Feb 10, 2020 07:33 AM
Hello,
We see the same thing in SCCM, usually as a result of a shell swap where a desktop support person will change the drive into a new machine to correct a hardware issue. Because the MAC address, serial number, etc. is new, SCCM creates a new device/ResourceID. We've also seen it if the SCCM client is reinstalled, and the SMSCFG.INI file is deleted as part of the reinstall. In SCCM the original machine will eventually be obsoleted and removed via the maintenance tasks, but not before the device is imported into FNMS.
I am not aware of an automated way to remove these duplicates from FNMS, to my knowledge it would be a manual process. It would be helpful if there was a script/upload/business adapter to delete a list of computers.
Feb 10, 2020 08:48 AM
Hi,
Once the original machine becomes obsolete in SCCM and is removed from the SCCM database by a maintenance task, it should also be deleted from FNMS during the the next Inventory import.
Finding and deleting duplicate Inventory devices in FNMS is a common challenge. I'm attaching a SQL script that allows checking for duplicates based on the Serial Number.
The script can be used for deleting computers if you
As long as duplicate computer are still found in the SCCM Inventory source database, there is no point in deleting them from the [ComplianceComputer] table in FNMS.
They would re-appear during the next Compliance import ...
Feb 10, 2020 09:04 AM - edited Feb 10, 2020 09:15 AM
Is this happening with VDI devices or others? I had a customer have a similar issue but was limited to just their non-persistent VDI environment (VMWare Horizons). Each time a user opened a new session, VMWare created a new VM with the same machine name but different serial number, which FNMS treated as unique devices and caused a ton of duplicates. Usually a VDI adapter is setup for this reasons (and no SCCM on the VDIs) but Flexera only supports the Citrix adapter and not VMWare. So our workaround was to delete the SCCM connection (they had the FNMS agent on most devices so not a big deal).
Feb 10, 2020 09:27 AM
May 07, 2020 04:34 AM