Operational Defect Database

BugZero found this defect 459 days ago.

Microsoft SQL Server | 2138330

Fixes a primary key violation error that's caused by a timing issue in change data capture (CDC) in SQL Server 2022. The CDC capture process may try to insert a duplicate start_lsn value in the cdc.lsn_time_mapping table, and you may see an error message that resembles the following one: Violation of PRIMARY KEY constraint 'lsn_time_mapping_clustered_idx'. Cannot insert duplicate key in object 'cdc.lsn_time_mapping'. The duplicate key value is (Value). Note This fix covers all the causes of this error. For the same issue that occurs in SQL Server 2019 that has a previous cumulative update installed, SQL Server 2017, and SQL Server 2016, see the previous fix KB 4521739. However, the previous fix didn't cover all the cases.

Last update date:

2/16/2023

Affected products:

SQL Server 2022 on Linux

SQL Server 2022 on Windows

Affected releases:

build lower than 16.0.4003.1

Fixed releases:

16.0.4003.1

Description:

Fixes a primary key violation error that's caused by a timing issue in change data capture (CDC) in SQL Server 2022. The CDC capture process may try to insert a duplicate start_lsn value in the cdc.lsn_time_mapping table, and you may see an error message that resembles the following one: Violation of PRIMARY KEY constraint 'lsn_time_mapping_clustered_idx'. Cannot insert duplicate key in object 'cdc.lsn_time_mapping'. The duplicate key value is (Value). Note This fix covers all the causes of this error. For the same issue that occurs in SQL Server 2019 that has a previous cumulative update installed, SQL Server 2017, and SQL Server 2016, see the previous fix KB 4521739. However, the previous fix didn't cover all the cases.

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Unavailable

Learn More

Search:

...