Hi Folks,
This post will help you understand the flow of Resync of Inventory in the ConfigMgr 2012. There are many scenarios when a resync can be generated;
1. If we miss a delta inventory.
2. If the get a badly formatted MIF. (E.g. There is a column mismatch or a datatype mismatch)
So below are the snippets that can help understand the issue and how to track it.
In the Dataldr.log –
Begin transaction: Machine=CM12-PR1-CL1(GUID:3495E328-878C-4230-8B53-80E200A9B0C4) SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:24 AM 4420 (0x1144)
WARNING - Attempting to resync due to missed delta reports (sp return code = 7) SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
Rollback transaction: Machine=CM12-PR1-CL1(GUID:3495E328-878C-4230-8B53-80E200A9B0C4) SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
SQL MESSAGE: spAddInventoryLog - Inventory Log for machine:CM12-PR1-CL1,Server:4.9,Client:4.11,Message:Missing Delta. Resync,Detail: SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
Remote client hardware inventory resync generated for client GUID:3495E328-878C-4230-8B53-80E200A9B0C4; update/insert result = 2 SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
Send resync command to local site for machine GUID:3495E328-878C-4230-8B53-80E200A9B0C4. SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
STATMSG: ID=2722 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_INVENTORY_DATA_LOADER" SYS=SQL2.*******.com SITE=PR1 PID=5936 TID=4420 GMTDATE=Wed Oct 01 01:08:25.604 2014 ISTR0="CM12-PR1-CL1" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
Cannot process MIF XHAP1CV7H.MIF, moving it to C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\BADMIFS\DeltaMismatch\utl30wij.MIF SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
STATMSG: ID=2703 SEV=W LEV=M SOURCE="SMS Server" COMP="SMS_INVENTORY_DATA_LOADER" SYS=SQL2.*******.com SITE=PR1 PID=5936 TID=4420 GMTDATE=Wed Oct 01 01:08:25.715 2014 ISTR0="XHAP1CV7H.MIF" ISTR1="C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\BADMIFS\DeltaMismatch\utl30wij.MIF" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_INVENTORY_DATA_LOADER 10/1/2014 6:38:25 AM 4420 (0x1144)
We actually run sp_CheckHinvReportVersion for checking the version of the inventory which evaluates the below condition to return 7,
if ((@ReportVersion > (@LastReportVersion + 1)) AND
(@ReportType = 0)) /* @ReportType(0)=DELTA, missed 1 or more deltas, resync
*/
BEGIN
select 7
/*SHDU_COMMAND_MISSED_DELTA_RESYNC*/
Then it logs (Sample) –
exec dbo.spAddInventoryLog
N'GUID:3495E328-878C-4230-8B53-80E200A9B0C4',17179869195,'LogInventoryStatus',N'Missing
Delta. Resync',N''
And then a resync is requested by calling–
exec sp_RC_InvResync N'GUID:3495E328-878C-4230-8B53-80E200A9B0C4', 1
The second parameter to the above procedure is the type of resync. Below are the types -
iResyncInvFlag | Type of inventory resync. |
1 | hardware inventory resync |
2 | software inventory resync |
10 | file collection |
20 | state system resync |
If you check this procedure, we simply create policy for the resync –
SELECT @padbid=PADBID FROM ResyncPolicy WHERE
InventoryFlag=@invflag AND ActiveFlag = 1
select @DeviceId = CONVERT(uniqueidentifier, CASE
LEN(@smsid) WHEN 36 then @smsid
elseSUBSTRING(
IF @padbid ISNOTNULL
@smsid, 6, LEN(@smsid)-5) end)
IF @padbid ISNOTNULL
BEGIN
IFEXISTS(select * from ResPolicyMap WHERE
MachineID=@machineid AND PADBID=@padbid AND IsTombstoned = 0)
SET @retval = 1
ELSE
BEGIN
SET @tempdate = GetUTCDate()
DELETEFROM ResPolicyMap WHERE MachineID=@machineid
AND PADBID=@padbid
INSERT INTO ResPolicyMap (MachineID, PADBID,
LastUpdateTime, IsTombstoned)
VALUES(@machineid, @padbid, @tem
INSERT INTO ResPolicyMap (MachineID, PADBID,
pdate, 0)
- ResyncPolicy is the table which gets updated and we modify the ResPolicyMap to the current time.
So a manual query to check the policyassignmentid –
SELECT * FROM ResyncPolicy where ActiveFlag = 1 and
InventoryFlag = 1
Once targeted to the client, the client then gets the same in the next policy cycle –
Validating PolicyAssignment '{1e51f138-7dbe-4137-9a8c-7e389c905a29}'. PolicyAgent_ReplyAssignments 10/1/2014 6:53:45 AM 42344 (0xA568)
PolicyAssignment:<PolicyAssignment PolicyAssignmentID="{1e51f138-7dbe-4137-9a8c-7e389c905a29}">
<Policy PolicyID="{1e658dd1-805a-4228-a36c-fc62f3565a50}" PolicyVersion="1.00" PolicyType="Machine" PolicyPriority="25">
<PolicyLocation PolicyHash="SHA256:AAAEEC34FB5EA404723D86529BC6C82705CE772898D24E9479EE3464BD5BA6E1" PolicyHashEx="SHA1:E21B61393EE818F13E08F2834347F636A9D441B9"><![CDATA[http://<mp>/SMS_MP/.sms_pol?{1e658dd1-805a-4228-a36c-fc62f3565a50}.1_00]]></PolicyLocation></Policy></PolicyAssignment> PolicyAgent_ReplyAssignments 10/1/2014 6:53:45 AM 42344 (0xA568)
And then sends the Resync inventory –
CInvState::ReadInventoryActionPolicy InventoryAgent 10/1/2014 6:55:03 AM 51356 (0xC89C)
Inventory: Action=Hardware, ReportType=ReSync, MajorVersion=5, MinorVersion=0 InventoryAgent 10/1/2014 6:55:03 AM 51356 (0xC89C)
Umair Khan
Support Escalation Engineer| Microsoft System Center Configuration Manager
Disclaimer:This posting is provided "AS IS" with no warranties and confers no rights.