I recently did some customizing on the SCCM reader when I noticed the current versions doing more or less this:
EXEC ('SELECT \ known.MachineID \ FROM #RelevantComputer AS known \ WHERE NOT EXISTS (SELECT 1 FROM Computer_System_Data AS c WHERE c.MachineID = known.MachineID)')
#RelevantComputer is just built from Computer_System_Data, so this lookup does not make any sense to me. Back in 2019 R2 it used to be different:
EXEC ('SELECT \ known.MachineID \ FROM #KnownComputer AS known \ WHERE NOT EXISTS (SELECT 1 FROM Computer_System_Data AS c WHERE c.MachineID = known.MachineID)')
This makes sense, as it compares what FNMS currently knows from this source (#KnownComputer) to what's currently in SCCM (Computer_System_Data).
Also notice, how the table alias is still known. What am I missing here?
May 24, 2022 10:00 AM
Good afternoon Markward, I hope your week's going well?
I'd advise raising this with Support to confirm.
I've taken a look through the code for the SCCM Reader, and I can see this change was made during the Obsolete Inventory changes in 2019R2.2 / 2020R1 (On-Premises).
It's not explicitly commented as an intentional change, so to be sure we can query this with our Product Engineering team.
I agree with your reasoning behind what should be happening here - if there's a record present in Known (AKA already present in the FNMS/ITAM DB), but not Computer_System_Data, I would assume this should be flagged as Deleted. The ELSE condition here is also checking whether its' obsolete or not on the SCCM DB.
Kind regards and thanks,
May 24, 2022 10:47 AM
I believe what you're observing here is related to the following known issue: IOJ-2193871: Devices deleted from SCCM may not be deleted in FlexNet Manager Suite when the connection to SCCM is configured on the application/batch server
At this time there is no known fix for this particular issue.
May 25, 2022 12:50 AM
Please find the fix attached. I just checked the fix in a customer system and I do see a few machines being removed every day.
This is really just replacing #RelevantComputer with #KnownComputer in the GetDeletedComputerList step. It is absed on the original files from each release.
I would like to point out that there's potentially another issue with the SMS reader importing old inventory: https://community.flexera.com/t5/FlexNet-Manager-Forum/SCCM-v-R-System-Valid/m-p/233537/highlight/true#M14936
May 25, 2022 03:39 AM
As you note, these changes are reverting the query back to the way it was in releases prior to the 2020 R1 release. The queries here were intentionally changed as part of addressing some other problematic behavior. I'm not sure of the details of the problem that was being addressed by the change, but be aware that [without some validation from Flexera Support & Engineering] reverting the change as suggested here may just be swapping one problem in the import logic for another problem.
May 25, 2022 04:05 AM
There has been a change in the subquery from System_DISC to v_R_System. I have not touched this part. As mentioned by @jevans, switching to #RelevantComputer just makes no sense.
May 25, 2022 04:12 AM - edited May 25, 2022 04:12 AM
I tried a fix on a customer with positive results. Now SCCM Devices will be deleted properly.
I'd see that as a proper solution for Known Issue (IOJ-2193871). So thanks a lot @mfranz .
Jun 13, 2022 04:59 AM
Update: Only Readers on "Integrated Beacons" (installed on FNMS App Server) are affected, hence the official workaround is using a "Standalone Beacon".
Jun 14, 2022 02:31 AM