You create a unique index that contains two or more included columns for a table in Microsoft SQL Server 2012 Service Pack 2 (SP2) or SQL Server 2014. When you try to enable change data capture for the table, you receive an error message that resembles the following:
Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 636
Could not update the metadata that indicates table table_name is enabled for Change Data Capture. The failure occurred when executing the command 'insert into table_name'. The error returned was 2627: 'Violation of PRIMARY KEY constraint 'index_columns_clustered_idx'. Cannot insert duplicate key in object 'cdc.index_columns'. The duplicate key value is (338100245, 0).'. Use the action and error to determine the cause of the failure and resubmit the request.
Cumulative Update information
This issue was first fixed in the following cumulative update of SQL Server:
Recommendation: Install the latest cumulative update for SQL Server
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the terminology that Microsoft uses to describe software updates.
Microsoft SQL Server 2012 Service Pack 2, Microsoft SQL Server 2014 Service Pack 1, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Standard, Microsoft SQL Server 2014 Express