Duplicate rows in DistributionContentVersion table after you reassign a DP in Configuration Manager

Si applica a: System Center Configuration Manager (current branch - version 1810)System Center Configuration Manager (current branch - version 1806)System Center Configuration Manager (current branch - version 1802)

Symptoms


In a System Center Configuration Manager version 1802 or later version hierarchy, you use the Reassign Distribution Point feature to reassign a distribution point (DP) to another primary site. Content validation is enabled on the DP.

In this scenario, after a new content validation cycle ends, duplicate rows for each package on the DP are generated in the DistributionContentVersion table, one for the old site and one for the new site.

The following is an example of what occurs when you reassign a DP from site PS2 to site PS1.

Figure 1: Output of the DistributionContentVersion table before you reassign the DP

Before DP move

Figure 2: Output of the DistributionContentVersion table after you reassign the DP and a new content validation cycle ends

After DP move

After you reassign the DP, merging data into the ContentDistribution table fails. For example, when the spRebuildContentDistribution procedure runs or the Configuration Data group is reinitialized, you receive the following error message:


Failure scenarios include adding a new site, recovering a site, and reinitializing configuration data.

Cause


When content validation is enabled, the DistributionContentVersion table's populated with data that is reported by content validation. When you reassign a DP from one site to another, the spMoveDistributionPoint procedure updates DPNALPath in the DistributionContentVersion table. However, it doesn't update SiteCode.

Therefore, after the DP is reassgined to the new site and a new content validation cycle runs, there are two rows for each package in the DistributionContentVersion table: One for the old site and one for the new site.

To determine whether you experience this issue, run the following SQL query:

SELECT * FROM DistributionContentVersion DCV
LEFT JOIN DistributionPoints DP ON DP.NALPath = DCV.DPNALPath
WHERE DCV.SiteCode <> DP.SMSSiteCode

If the result isn't NULL, the issue occurs.

Resolution


To fix the issue, update to Configuration Manager version 1902.

Workaround


To work around this issue without updating, run the following SQL statements on the central administration site or a primary site after you reassign the DP: