Refresh Pending Packages on Distribution Points


In a perfect world this never happens. BUT as we pretty often experience packages doesn’t reach its destination distribution point and gets stuck on the Pending status, and triggering a refresh on the distribution point doesn’t help. Of course we could just update the Distribution Points for the package, but that would affect all distribution points and in large environments that isn’t good enough. Below is a T-Sql script that I’m using to resolve this scenario by resetting the package on the distribution point in SQL and then do a refresh of the DP.

DISCLAIMER: This solution is brought AS IS with no warranties, and remember editing the ConfigMgr database is NOT supported by Microsoft.

1. Paste the SQL query below into a SQL Management Studio query window

Update pkgstatus set [Status] = 2 where id = '%PACKAGEID%' and sitecode = '%TARGETSITECODE%' and type = 1
Update pkgstatus set SourceVersion = 0 where id = '%PACKAGEID%' and sitecode = '%TARGETSITECODE%' and type = 1

2. Replace the variables %SITECODE%, %PACKAGEID% and %TARGETSITECODE% with your primary sitecode, packageid for your pending package and finally the sitecode for you target distribution point

3. Execute query

4. Refresh the package on the target distribution

5. Finished

Leave a Reply