cdc.captured_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 column tracked in a capture instance. By default, all columns of the source table are captured. However, columns can be included or excluded when the source table is enabled for change data capture by specifying a column list. 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_get_source_columns stored procedure.

Column nameData typeDescription
object_idintID of the source table to which the captured column belongs.
column_namesysnameName of the captured column.
column_idintID of the captured column within the source table.
column_typesysnameType of the captured column.
column_ordinalintColumn ordinal (1-based) in the change table. The metadata columns in the change table are excluded. Ordinal 1 is assigned to the first captured column.
is_computedbitIndicates that the captured column is a computed column in the source table.

cdc.change_tables (Transact-SQL)

Community Additions