Accindently deleting computer objects in the Config Mgr. console has happened in the past and it will most likely happen again in the future. This post will hopefully help you understand what’s going on in the background and how Configuration Manager recovers the deleted objects.

Components involved

On the site server the data loader component is responsible for loading inventory data (and other stuff) into the SQL database. The log file used is Dataldr.log

On the client you should pay attention to the Inventory Agent which is responsible for gathering inventory data. The log file used is InventoryAgent.log

What happens

When you delete an object in the database, you don’t uninstall anything on the client. For that reason, the client doesn’t have a clue about what’s going on. So it will continue to ask for policy updates, run inventory cycle ect.

  1. When a client runs the inventory cycle it will initially run a Full inventory after that only Delta inventory cycles are initiated.

    From the InventoryAgent.log – Notice the ReportType

    Inventory: Message type is InventoryAction    InventoryAgent    04-06-2009 09:38:16    5636 (0x1604)
    Inventory: Temp directory = C:\WINDOWS\system32\CCM\Inventory\Temp\    InventoryAgent    04-06-2009 09:38:16    5636 (0x1604)
    Inventory: Clearing old collected files.    InventoryAgent    04-06-2009 09:38:16    5636 (0x1604)
    Inventory: Opening store for action {00000000-0000-0000-0000-000000000001} …    InventoryAgent    04-06-2009 09:38:16    5636 (0x1604)
    Inventory: Action=Hardware ReportType=Delta    InventoryAgent    04-06-2009 09:38:45    5636 (0x1604)

  2. The dataloader component will receive the delta data and add them to an existing record in the database. But the record has been deleted and the mif file (the mif file contains the inventory information) will be discarded and moved to a folder called Badmifs.

    From the Dataldr.log – Notice the error, resync command and moving the mif file.
    Processing Inventory for Machine: _TESTT400_KEA   Version 1.4  Generated: 06/04/2009 09:29:49    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:53    7452 (0x1D1C)
    Begin transaction: Machine=_TESTT400_KEA(GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F)    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:53    7452 (0x1D1C)
    ERROR – attempt to update non-existent row. Invalid command:  exec pWorkstationStatus_DATA 1,891,’06/04/2009 09:29:53′,1,’6/4/2009 09:29′,’4294967300′,1033,120    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:53    7452 (0x1D1C)
    Rollback transaction: Machine=_TESTT400_KEA(GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F)    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)
    Remote client hardware inventory resync generated for client GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F; update/insert result = 1    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)
    Send resync command to local site for machine GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F.    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)
    STATMSG: ID=2722 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_INVENTORY_DATA_LOADER" SYS=DKHS1012P SITE=HS1 PID=1784 TID=7452 GMTDATE=to jun 04 07:29:54.151 2009 ISTR0="_TESTT400_KEA" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)
    Cannot process MIF XHN3LP46F.MIF, moving it to C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\BADMIFS\ey9l8ii1.MIF    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)
    STATMSG: ID=2703 SEV=W LEV=M SOURCE="SMS Server" COMP="SMS_INVENTORY_DATA_LOADER" SYS=DKHS1012P SITE=HS1 PID=1784 TID=7452 GMTDATE=to jun 04 07:29:54.167 2009 ISTR0="XHN3LP46F.MIF" ISTR1="C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\BADMIFS\ey9l8ii1.MIF" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:29:54    7452 (0x1D1C)

  3. The client will pick up the Resync flag as part of the next policy download. This will force the Inventory agent to perform a Resync inventory type.

    From the InventoryAgent.log – Notice the ReportType

    Inventory: Message type is InventoryAction    InventoryAgent    04-06-2009 09:33:39    3212 (0x0C8C)
    Inventory: Temp directory = C:\WINDOWS\system32\CCM\Inventory\Temp\    InventoryAgent    04-06-2009 09:33:39    3212 (0x0C8C)
    Inventory: Clearing old collected files.    InventoryAgent    04-06-2009 09:33:39    3212 (0x0C8C)
    Inventory: Opening store for action {00000000-0000-0000-0000-000000000001} …    InventoryAgent    04-06-2009 09:33:39    3212 (0x0C8C)
    Inventory: Action=Hardware ReportType=ReSync    InventoryAgent    04-06-2009 09:34:12    3212 (0x0C8C)

  4. The data loader will take the complete inventory information and add it to the database. Once the data is added into the database the client will become visible in the console once again – well it might take just a few “config mgr” seconds before it happens.

    From the dataldr.log – Notice the InsertMachine

    Processing Inventory for Machine: _TESTT400_KEA   Version 2.0  Generated: 06/04/2009 09:34:22    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:44    5052 (0x13BC)
    CMachineSource::InsertMachine – machine info is resynced data (ie: MIF is a full/resync report).    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:44    5052 (0x13BC)
    STATMSG: ID=2715 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_INVENTORY_DATA_LOADER" SYS=DKHS1012P SITE=HS1 PID=1784 TID=5052 GMTDATE=to jun 04 07:34:44.771 2009 ISTR0="SMS Inventory Agent" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:44    5052 (0x13BC)
    Begin transaction: Machine=_TESTT400_KEA(GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F)    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:45    5052 (0x13BC)
    Commit transaction: Machine=_TESTT400_KEA(GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F)    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:46    5052 (0x13BC)
    Done: Machine=_TESTT400_KEA(GUID:855F4F78-C950-4696-BD0C-70F2195C4A7F) code=0 (1016 stored procs in XH3UZ0S2Q.MIF)    SMS_INVENTORY_DATA_LOADER    04-06-2009 09:34:46    5052 (0x13BC)