Symptoms
Consider the following scenario:
-
You create a table that has the primary key, and you add some rows to it in Microsoft SQL Server 2019 or 2017.
-
You add a column that has a default constraint, and you modify the primary key to include the new column.
-
You create a transactional publication and subscription for this table.
In this scenario, the Distribution Agent fails when it tries to apply UPDATE or DELETE at the subscriber on rows that existed before adding the new column. Additionally, you receive the following "20598" error message:
The row was not found at the Subscriber when applying the replicated UPDATE command for Table 'TableName' with Primary Key(s): (null)
Resolution
This problem is fixed in the following cumulative updates for SQL Server:
Each new cumulative update for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for your version of SQL Server:
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminology that Microsoft uses to describe software updates.