FIX: Cannot enable "change data capture" on a table that uses a unique index with more than one included column in SQL Server 2012 or 2014

Symptoms
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:
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.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 3076444 - Last Review: 08/17/2015 19:07:00 - Revision: 3.0

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

  • kbqfe kbsurveynew kbfix kbexpertiseinter KB3076444
Feedback