PART 2 : MODIFY/ UPDATE "Distribution Point Configuration Status" entries
WARNING: MODIFY DATABASE IS NOT SUPPORTED BY MICROSOFT.In "\Monitoring\Overview\Distribution Status\Distribution Point Configuration Status" there is sometime some status messages which have not been deleted or updated automatically by SCCM.
Example: I have a Distribution Point indicating "restart might be required" but after verification computers have been rebooted 3 times since message
So for better monitoring you want ALL distribution point status Green
Here, a distribution point not Green
"Restart might be required" Problem
Message: Restart might be required
Message Detail : SMS Client
For "Restart might be required" I found a blog https://www.nova17.de/2016/08/dp-content-status-restart-might-be-required/indicating how to delete this entry
However, I find something better I think.
Here I use DATEDIFF to have only lines > 60 days
I 1st check how many DP with this error:
SELECT count(*) FROM DistributionStatus
WHERE 1=1
AND InsStr2 = '3010'
AND (DATEDIFF(dd, LastStatusTime,Getdate()) >= 60 )
Ouch: 203 Pull Distribution Point!!!
SELECT * FROM DistributionStatus
WHERE 1=1
AND InsStr2 = '3010'
AND (DATEDIFF(dd, LastStatusTime,Getdate()) >= 60 )
ORDER BY LastStatusTime
Finally checking all fields that LastStatusMsgID could have value 2364 or 2366
but it seems that
when value = 2364 "Status Type"is "In Progress" with "SMS Client" in "Message Detail"
and
when LastStatusMsgID=2366 "Status Type" is "Success" and "Message Detail" is "Distribution Manager attempted to run a tool to install IIS component of operating system to distribution point "DNLPATH". Reboot or manual installation of IIS might be required to complete the configuration of IIS component of operating system. Also please ensure that the http(s) traffic is not blocked on this machine by firewall settings."
I check that on a DP with value LastStatusMsgID=2364
Then I update value to 2366
UPDATE DistributionStatus
SET LastStatusMsgID = '2366' WHERE InsStr2 = '3010' AND (DATEDIFF(dd, LastStatusTime,Getdate()) >= 60 ) AND DPNALPath LIKE '%XXXXX%'
Et Voilà. Better than use Delete
[EDIT 2019-01 begin ]
To check all servers with message ''restart might be required' > 60 days
SELECT * FROM DistributionStatus as DS
INNER JOIN DistributionPointMessages as DPM ON DPM.DistributionStatusID = DS.ID
WHERE DS.InsStr2 = '3010' AND DS.LastStatusMsgID = '2364'
AND (DATEDIFF(dd, DPM.LastStatusTime,Getdate()) >= 60 )
ORDER BY DPM.LastStatusTime
LastStatusTime from DistributionStatus is not correct Time: good time is from DistributionPointMessages table
and update for all these servers to 'success' query is:
UPDATE DS SET LastStatusMsgID = '2366' FROM DistributionStatus AS DS INNER JOIN DistributionPointMessages as DPM ON DPM.DistributionStatusID = DS.ID WHERE DS.InsStr2 = '3010' AND DS.LastStatusMsgID = '2364' AND (DATEDIFF(dd, DPM.LastStatusTime,Getdate()) >= 60 )
Update DistributionStatus here change also DistributionPointMessages table
[EDIT 2019-01 end ]
"Failed to retrieve the package list on the distribution point" Problem
Message: Processing content
Message Detail : Failed to retrieve the package list on the distribution point ["Display=\\COMPUTERNAME.MYDOM.NET\"]MSWNET:["SMS_SITE=XXX"]\\COMPUTERNAME.MYDOM.NET\. Or the package list in content library doesn't match the one in WMI. Review smsdpmon.log for more information about this failure.
Update DistributionStatus
Set LastStatusMsgID = '2393' WHERE DPNALPath LIKE '%XXXXXXX%'
AND LastStatusMsgID = '2388'
AND (DATEDIFF(dd, LastStatusTime,Getdate()) >= 60 )
AND DPNALPath LIKE '%XXXXX%'
-> that modify also [DistributionPointMessages] with trigger
MessageCategory =115 MessageID = "2388" to MessageCategory =119 MessageID = "2393"
2388 = Failed to retrieve the package list on the distribution point ["Display=\\COMPUTERNAME.MYDOM.NET\"]MSWNET:["SMS_SITE=XXX"]. Or the package list in content library doesn't match the one in WMI. Review smsdpmon.log for more information about this failure.
2393 = Successfully retrieved and validated the package list from the distribution point ["Display=\\COMPUTERNAME.MYDOM.NET\"]MSWNET:["SMS_SITE=XXX"].
[EDIT 2019-01 begin ]
To check all servers with message ''failed to retrieve package' > 60 days
SELECT * FROM DistributionStatus as DS
INNER JOIN DistributionPointMessages as DPM ON DPM.DistributionStatusID = DS.ID
WHERE LastStatusMsgID = '2388' AND (DATEDIFF(dd, DPM.LastStatusTime,Getdate()) >= 60 )
ORDER BY DPM.LastStatusTime
LastStatusTime from DistributionStatus is not correct Time: good time is from DistributionPointMessages table
update for all these servers to 'success' query is:
UPDATE DS Set LastStatusMsgID = '2393' FROM DistributionStatus AS DS INNER JOIN DistributionPointMessages as DPM ON DPM.DistributionStatusID = DS.ID WHERE DS.LastStatusMsgID = '2388' AND (DATEDIFF(dd, DPM.LastStatusTime,Getdate()) >= 60 )
Update DistributionStatus here change also DistributionPointMessages table
[EDIT 2019-01 end ]
No comments:
Post a Comment