cdc.index_columns (Transact-SQL)

 

Updated: June 10, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns one row for each index column associated with a change table. The index columns are used by change data capture to uniquely identify rows in the source table. By default, the columns of the primary key of the source table are included. However, if a unique index on the source table is specified when change data capture is enabled on the source table, columns in that index are used instead. A primary key or unique index is required on the source table if net change tracking is enabled. For more information, see sys.sp_cdc_enable_table (Transact-SQL).

We recommend that you do not query the system tables directly. Instead, execute the sys.sp_cdc_help_change_data_capture stored procedure.

Column nameData typeDescription
object_idintID of the change table.
column_namesysnameName of the index column.
index_ordinaltinyintOrdinal (1-based) of the column within the index.
column_idintID of the column in the source table.

cdc.change_tables (Transact-SQL)

Community Additions

ADD
Show: