SMS Provider reported an error: CSspInventoryReport::GetRealInstance: Failed to get item from database

July 29, 2016 at 2:21 pm in ConfigMgr, SQL, WMI by Ken Goossens

A friend recently had some issues while trying to extend the hardware inventory.  Actually he wasn’t able to Set Classes from the Default Client Setting neither from a Custom Client Settings. When clicking on Set Classes to import a custom MOF file, we received the error message below:

image

After reading the error message carefully and clicking on OK, we got an empty Hardware Inventory Classes Window. This happened time after time.

image

We started to look in the smsprov.log and compared that log file with the same log file from a test environment where everything is working properly.

image

As you can see in the pictures above, there is 1 big difference between the working site and the site having the problem on the right.

Working Site – Query:

select Description,DefaultTimeout,ReportTimeout from InventoryAction where ActionID=N'{00000000-0000-0000-0000-000000000001}’

Malfunction Site – Query:

select Description,DefaultTimeout,ReportTimeout from InventoryAction where ActionID=N’00000000-0000-0000-0000-000000000001′

Can you see the difference in the queries? Right, the braces. We are missing the braces in the Malfunction Query. Then the next question, were does configuration manager look for this value.

Our first idea and probably the idea of many ConfigMgr admins is WMI. So again we compared our working environment with the malfunction environment. Now guess what, we found the value in WMI

SELECT * FROM SMS_SCI_ClientComp WHERE FileType=2 AND ItemName=’Hardware Inventory Agent’ AND ItemType=’Client Component’ AND SiteCode=’PS1′

Below you can see that Value2 doesn’t have any bracers. Which is the problem.

image

Below the correct value with bracers.

image

We have tried to change that value to include the bracers, but everything we’ve tried failed. Then we thought that the value might have been somewhere in the registry because of the REG_SZ in Value1. Unfortunately nothing useful in the registry.

So there is only 1 option left, the site control file.

I want you to know, that Microsoft doesn’t support this. So if you make changes to the site control file, you really need to make sure that you know what you’re doing.

Again we compared the site control file from a working environment with our problem environment. Below the InventoryReportID from the problem site.

image

Below the same part from our working environment.

image

As you see, the bracers are missing here as well.

Now that we have found the location to change the value, it’s only a matter of running the correct query in SQL to update the Site Control File. Make sure before you start, that you have a correct backup. Because you never know, I would even suggest you to first run the query in your test environment to make 100% sure that you are changing the correct value, again, this is not supported by Microsoft.

image

Update SC_ClientComponent_Property set value2 = ‘{00000000-0000-0000-0000-000000000001}’ where name = ‘InventoryReportID’

Let’s have a look to see if we can set a class in the hardware inventory.

image

Yes we can :-)

To make sure that all the changes are applied in WMI, it’s recommended to reboot or restart the SMS Services.

Hope it helps!!

Ken

Tweet about this on Twitter0Share on LinkedIn0Share on Facebook0